diff options
| author | Diego Guimarães <diegobr.sistemas@gmail.com> | 2014-09-08 19:38:07 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-11-27 19:42:30 -0500 |
| commit | f39b0421b406b411c3bcb58e8aa415d885fea505 (patch) | |
| tree | a98fcdb8b484682feb7f02c3ce52ac06686aefaf /tests/contenttypes_tests | |
| parent | abf87333a163717308927ad1f230efe45d622c69 (diff) | |
Fixed #23338 -- Added warning when unique=True on ForeigKey
Thanks Jonathan Lindén for the initial patch, and Tim Graham
and Gabe Jackson for the suggestions.
Diffstat (limited to 'tests/contenttypes_tests')
| -rw-r--r-- | tests/contenttypes_tests/tests.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/contenttypes_tests/tests.py b/tests/contenttypes_tests/tests.py index 20efbe4145..64414a8732 100644 --- a/tests/contenttypes_tests/tests.py +++ b/tests/contenttypes_tests/tests.py @@ -105,6 +105,7 @@ class IsolatedModelsTestCase(TestCase): apps.clear_cache() +@override_settings(SILENCED_SYSTEM_CHECKS=['fields.W342']) # ForeignKey(unique=True) class GenericForeignKeyTests(IsolatedModelsTestCase): def test_str(self): @@ -202,6 +203,7 @@ class GenericForeignKeyTests(IsolatedModelsTestCase): ] self.assertEqual(errors, expected) + @override_settings(INSTALLED_APPS=['django.contrib.auth', 'django.contrib.contenttypes', 'contenttypes_tests']) def test_generic_foreign_key_checks_are_performed(self): class MyGenericForeignKey(GenericForeignKey): def check(self, **kwargs): |
