mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Fixed #21281 -- Made override_settings act at class level when used as a TestCase decorator.
This commit is contained in:
committed by
Tim Graham
parent
8b77b64f1c
commit
d89f56dc4d
@@ -919,3 +919,11 @@ to construct the "view on site" URL. This URL is now accessible using the
|
||||
``FormMixin`` subclasses that override the ``get_form()`` method should make
|
||||
sure to provide a default value for the ``form_class`` argument since it's
|
||||
now optional.
|
||||
|
||||
Overriding ``setUpClass`` / ``tearDownClass`` in test cases
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The decorators :func:`~django.test.override_settings` and
|
||||
:func:`~django.test.modify_settings` now act at the class level when used as
|
||||
class decorators. As a consequence, when overriding ``setUpClass()`` or
|
||||
``tearDownClass()``, the ``super`` implementation should always be called.
|
||||
|
||||
Reference in New Issue
Block a user