mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed test failures introduced in refs #23861.
This commit is contained in:
parent
ce17b045bf
commit
789baf9c3a
2 changed files with 7 additions and 4 deletions
|
@ -291,8 +291,7 @@ class SilencingCheckTests(TestCase):
|
|||
self.assertEqual(err.getvalue(), '')
|
||||
|
||||
|
||||
class CheckFrameworkReservedNamesTests(TestCase):
|
||||
|
||||
class IsolateModelsMixin(object):
|
||||
def setUp(self):
|
||||
self.current_models = apps.all_models[__package__]
|
||||
self.saved_models = set(self.current_models)
|
||||
|
@ -302,6 +301,8 @@ class CheckFrameworkReservedNamesTests(TestCase):
|
|||
del self.current_models[model]
|
||||
apps.clear_cache()
|
||||
|
||||
|
||||
class CheckFrameworkReservedNamesTests(IsolateModelsMixin, TestCase):
|
||||
@override_settings(
|
||||
SILENCED_SYSTEM_CHECKS=['models.E20', 'fields.W342'], # ForeignKey(unique=True)
|
||||
INSTALLED_APPS=['django.contrib.auth', 'django.contrib.contenttypes', 'check_framework']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue