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

This PR updates a code sample in the documentation when using an existing database for the tests. I ran across this omission when setting up my own project... I copied...

It restores the DB name for example - not sure if this is done differently already.

TODO: - [ ] doc As for deprecation warnings, I think this is not really needed (now), but asked about it in https://github.com/pytest-dev/pytest/issues/4900#issuecomment-471336056 already.

enhancement

This new PR updates #310, which was 2 years old. See that PR for the details of what's included.

Fixes #565 This is based on conversations in issues #553, #554, and #284 - Introduces a django_user fixture, which is a user with no additional priveleges. Similar to admin_user. -...

I've came up with this when using pytest-django with https://github.com/djangonauts/django-rest-framework-gis/ (https://github.com/djangonauts/django-rest-framework-gis/pull/123), where it turned out useful to detect and add the tests dir to `sys.path` - but it's probably not...

enhancement

Fixes #337. Checks are run at the start of tests, like Django does in 1.11+ after django/django#6294 was merged.

enhancement

this got stuck for some reason: https://github.com/pytest-dev/pytest-django/pull/98

db-configuration
enhancement

The Github Actions have been failing on new PRs. They are failing on the "codecov" step. Did the Codecov API token expire? see `secrets.CODECOV_TOKEN` in codecov.yml - https://github.com/pytest-dev/pytest-django/blob/master/.github/workflows/main.yml#L62 The error...

The documentation indicates we can use [django_db_blocker](https://pytest-django.readthedocs.io/en/latest/database.html#django-db-blocker) to unblock database access and enable tests to utilize a real database. Alternatively we can implement [django_db_setup](https://pytest-django.readthedocs.io/en/latest/database.html#using-an-existing-external-database-for-tests) to use a real database. Is...