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

My project uses django_audit_log. When pytest creates the test database it fails because whilst creating it and applying migrations it generates models. These trigger the auditlog, whose own latest migrations...

Hi! I've found that databases are not always blocked when they should be in a multi-db setup. (Related to #924) Allowing access to a single database can grant access to...

When running tests with pytest-django, I've encountered an issue where cache data is being shared between test cases, especially when testing throttling logic. This causes tests to fail inconsistently, as...

I've got tests which rely on a database with initial data (which is possible as explained [here](https://pytest-django.readthedocs.io/en/latest/database.html#populate-the-database-with-initial-test-data)). I want to check that the initial data are present as expected and...

We've been testing our query counts, and found our tests weren't independent due to the caching of ContentTypes causing query counts to depend on test ordering. There's a handy pytest-django...

When using `pytest_django.asserts.assertXMLEqual`, the diff in the console is truncated, with the following message at the end: ``` Diff is ### characters long. Set self.maxDiff to None to see it....

Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.10.0 to 1.10.2. Release notes Sourced from pypa/gh-action-pypi-publish's releases. v1.10.2 💅 Cosmetic Output Improvements In #250 and #258, @​facutuesca💰 added a nudge message with a magic link...

dependencies

Bumps [hynek/build-and-inspect-python-package](https://github.com/hynek/build-and-inspect-python-package) from 2.8.0 to 2.9.0. Release notes Sourced from hynek/build-and-inspect-python-package's releases. v2.9.0 Changed uv build is now used instead of the build package. Since the actual build of the...

dependencies

I've got some fixtures loaded with pytest_plugins, these fixtures were doing a top level import of models. So this was triggering an issue due to early import of the models....

I wish it was as easy as this: ``` @pytest.fixture(scope="session") def session_settings(): """A Django settings object which restores changes after the test session""" skip_if_no_django() wrapper = SettingsWrapper() yield wrapper wrapper.finalize()...