mirror of
https://github.com/django/django.git
synced 2025-11-02 04:48:33 +00:00
Also copy __module__ to our dynamically created TestCase subclass when override_settings acts as a class decorator.
Otherwise, an error in e.g. a test in tests/modeltests/proxy_model_inheritance/tests.py was being reported as: ERROR: test_table_exists (django.test.utils.ProxyModelInheritanceTests) Refs #16672 and [16650]. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16722 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
efd682e436
commit
2b4341d532
2 changed files with 4 additions and 0 deletions
|
|
@ -18,6 +18,9 @@ class FullyDecoratedTranTestCase(TransactionTestCase):
|
|||
def test_decorated_testcase_name(self):
|
||||
self.assertEquals(FullyDecoratedTranTestCase.__name__, 'FullyDecoratedTranTestCase')
|
||||
|
||||
def test_decorated_testcase_module(self):
|
||||
self.assertEquals(FullyDecoratedTranTestCase.__module__, __name__)
|
||||
|
||||
FullyDecoratedTranTestCase = override_settings(TEST='override')(FullyDecoratedTranTestCase)
|
||||
|
||||
# @override_settings(TEST='override')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue