summaryrefslogtreecommitdiff
path: root/tests/apps
diff options
context:
space:
mode:
authorLoic Bistuer <loic.bistuer@gmail.com>2014-10-23 01:28:57 +0700
committerLoic Bistuer <loic.bistuer@gmail.com>2014-10-23 01:46:04 +0700
commitb62f72498af8a8cb4ddb3000421c5642bda57761 (patch)
treec75b6c01b7ba7a0cd8dc946d963e2bb244c66912 /tests/apps
parent8c4ca16c65174db63471f12b005f5423b61de073 (diff)
downloaddjango-b62f72498af8a8cb4ddb3000421c5642bda57761.tar.gz
Improved warning message when reloading models. Refs #23621.
Thanks dfunckt and Tim Graham.
Diffstat (limited to 'tests/apps')
-rw-r--r--tests/apps/tests.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/apps/tests.py b/tests/apps/tests.py
index 7246cd57d6..1a308efb6a 100644
--- a/tests/apps/tests.py
+++ b/tests/apps/tests.py
@@ -234,7 +234,10 @@ class AppsTests(TestCase):
type(str("SouthPonies"), (models.Model,), body)
self.assertEqual(len(w), 1)
self.assertTrue(issubclass(w[-1].category, RuntimeWarning))
- self.assertEqual(str(w[-1].message), "Model 'southponies.apps' was already registered.")
+ self.assertEqual(str(w[-1].message),
+ "Model 'southponies.apps' was already registered. "
+ "Reloading models is not advised as it can lead to inconsistencies, "
+ "most notably with related models.")
# If it doesn't appear to be a reloaded module then we expect
# a RuntimeError.