pytest-django icon indicating copy to clipboard operation
pytest-django copied to clipboard

A Django plugin for pytest.

Results 185 pytest-django issues
Sort by recently updated
recently updated
newest added
trafficstars

We seem to have an issue in our test setup with `pytest-django` and the new 8.0.0 release of pytest. Just pinning pytest to the last 7.x version is a working...

I've been using a custom `django_db_setup` fixture which has worked for years. After upgrading from `4.6` to `4.7` this suddenly doesn't work anymore, resulting in the following error: `RuntimeError: Database...

Not sure what is the root cause of the issue, pytest debug in Python 3.11 works fine. So I try to run the test as usual in debug mode via...

Hi, At my company we have a problem that we have to use mark on every test: ```python @pytest.mark.django_db(databases="__all__") def test_something(db): ... @pytest.mark.django_db(databases="__all__") def test_other(db): ... # + a bunch...

When running tests in parallel, we need to add a suffix to Django DB names to avoid clashes. This previously used `TOX_PARALLEL_ENV`, but [Tox no longer sets this environment variable](https://github.com/tox-dev/tox/issues/1275#issuecomment-1012054037)....

# Problem description Ever since I added the `live_server` to my tests, other tests started to fail, that did previously pass. ## Details The fixture to setup my browser with...

I use the liveserver fixture with a fixed port because I need SSL and have nginx setup in front of it. The first test runs fine, but when running another...

As per the [docs]( https://pytest-django.readthedocs.io/en/latest/database.html#reuse-db-reuse-the-testing-database-between-test-runs): > Using `--reuse-db` will create the test database in the same way as `manage.py` test usually does. However, after the test run, the test database...

## Background I have an issue when i using pytest. Originally was using `pytest-django` for running my test suite but after it broke i switched to django test suite. I...

environment: ```txt Postgresql 14.7.0 Python 3.10 Django==4.2.8 djangorestframework==3.14.0 pytest-django==4.7.0 pytest==7.4.3 pytest-celery==0.0.0 pytest-django==4.7.0 pytest-elasticsearch==4.0.2 pytest-factoryboy==2.6.0 pytest-mock==3.12.0 pytest-xdist==3.5.0 ``` the error log ```bash self = no_load = False def _get_session(self, no_load=False): """...