Pytest-django

Latest version: v4.9.0

Safety actively analyzes 681881 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 9 of 10

2.2.1

------

* Fixed an issue with the settings fixture when used in combination with
django-appconf. It now uses pytest's monkeypatch internally and should
be more robust.

2.2.0

------

* Python 3 support. pytest-django now supports Python 3.2 and 3.3 in addition
to 2.5-2.7. Big thanks to Rafal Stozek for making this happen!

2.1.0

------

* Django 1.5 support. pytest-django is now tested against 1.5 for Python
2.6-2.7. This is the first step towards Python 3 support.

2.0.1

------

* Fixed 24/25: Make it possible to configure Django via
``django.conf.settings.configure()``.

* Fixed 26: Don't set DEBUG_PROPAGATE_EXCEPTIONS = True for test runs. Django
does not change this setting in the default test runner, so pytest-django
should not do it either.

2.0.0

------

This release is *backward incompatible*. The biggest change is the need
to add the ``pytest.mark.django_db`` to tests which require database
access.

Finding such tests is generally very easy: just run your test suite, the
tests which need database access will fail. Add ``pytestmark =
pytest.mark.django_db`` to the module/class or decorate them with
``pytest.mark.django_db``.

Most of the internals have been rewritten, exploiting py.test's new
fixtures API. This release would not be possible without Floris
Bruynooghe who did the port to the new fixture API and fixed a number of
bugs.

The tests for pytest-django itself has been greatly improved, paving the
way for easier additions of new and exciting features in the future!

* Semantic version numbers will now be used for releases, see https://semver.org/.

* Do not allow database access in tests by default. Introduce
``pytest.mark.django_db`` to enable database access.

* Large parts re-written using py.test's 2.3 fixtures API (issue 9).

- Fixes issue 17: Database changes made in fixtures or funcargs
will now be reverted as well.

- Fixes issue 21: Database teardown errors are no longer hidden.

- Fixes issue 16: Database setup and teardown for non-TestCase
classes works correctly.

* ``pytest.urls()`` is replaced by the standard marking API and is now
used as ``pytest.mark.urls()``

* Make the plugin behave gracefully without DJANGO_SETTINGS_MODULE
specified. ``py.test`` will still work and tests needing django
features will skip (issue 3).

* Allow specifying of ``DJANGO_SETTINGS_MODULE`` on the command line
(``--ds=settings``) and py.test ini configuration file as well as the
environment variable (issue 3).

* Deprecate the ``transaction_test_case`` decorator, this is now
integrated with the ``django_db`` mark.

1.4

----
* Removed undocumented pytest.load_fixture: If you need this feature, just use
``django.management.call_command('loaddata', 'foo.json')`` instead.
* Fixed issue with RequestFactory in Django 1.3.

* Fixed issue with RequestFactory in Django 1.3.

Page 9 of 10

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.