Last active
June 9, 2021 13:33
-
-
Save velotiotech/ec5134f477593ac7f2a9a2b373f291f2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ pytest | |
============================= test session starts ============================== | |
platform linux -- Python 3.7.0, pytest-6.2.2, py-1.10.0, pluggy-0.13.1 | |
django: settings: pytest_fixtures.settings (from ini) | |
rootdir: /home/suraj/PycharmProjects/e_commerce_app, configfile: pytest.ini | |
plugins: django-4.1.0 | |
collected 1 item | |
product/tests/test_models.py F [100%] | |
=================================== FAILURES =================================== | |
_____________________________ test_create_category _____________________________ | |
def test_create_category(): | |
> category = Category.objects.create(name="Books") | |
product/tests/test_models.py:5: | |
... | |
E RuntimeError: Database access not allowed, use the "django_db" mark, or the "db" or "transactional_db" fixtures to enable it. | |
venv/lib/python3.7/site-packages/django/db/backends/base/base.py:235: RuntimeError | |
=========================== short test summary info ============================ | |
FAILED product/tests/test_models.py::test_create_category - RuntimeError: Dat... | |
============================== 1 failed in 0.21s =============================== |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment