summaryrefslogtreecommitdiff
path: root/tests/multiple_database
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2016-06-16 11:19:18 -0700
committerTim Graham <timograham@gmail.com>2016-06-16 14:19:18 -0400
commit4f336f66523001b009ab038b10848508fd208b3b (patch)
tree47474fb588013f1770246455ef7aa1a4163a1edb /tests/multiple_database
parentea34426ae789d31b036f58c8fd59ce299649e91e (diff)
downloaddjango-4f336f66523001b009ab038b10848508fd208b3b.tar.gz
Fixed #26747 -- Used more specific assertions in the Django test suite.
Diffstat (limited to 'tests/multiple_database')
-rw-r--r--tests/multiple_database/tests.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/multiple_database/tests.py b/tests/multiple_database/tests.py
index fe1c4d86fb..763f92777a 100644
--- a/tests/multiple_database/tests.py
+++ b/tests/multiple_database/tests.py
@@ -667,8 +667,8 @@ class QueryTestCase(TestCase):
charlie.set_unusable_password()
# initially, no db assigned
- self.assertEqual(new_bob_profile._state.db, None)
- self.assertEqual(charlie._state.db, None)
+ self.assertIsNone(new_bob_profile._state.db)
+ self.assertIsNone(charlie._state.db)
# old object comes from 'other', so the new object is set to use 'other'...
new_bob_profile.user = bob
@@ -820,7 +820,7 @@ class QueryTestCase(TestCase):
# base object.
review3 = Review(source="Python Daily")
# initially, no db assigned
- self.assertEqual(review3._state.db, None)
+ self.assertIsNone(review3._state.db)
# Dive comes from 'other', so review3 is set to use 'other'...
review3.content_object = dive
@@ -1178,8 +1178,8 @@ class RouterTestCase(TestCase):
chris = Person(name="Chris Mills")
html5 = Book(title="Dive into HTML5", published=datetime.date(2010, 3, 15))
# initially, no db assigned
- self.assertEqual(chris._state.db, None)
- self.assertEqual(html5._state.db, None)
+ self.assertIsNone(chris._state.db)
+ self.assertIsNone(html5._state.db)
# old object comes from 'other', so the new object is set to use the
# source of 'other'...
@@ -1432,7 +1432,7 @@ class RouterTestCase(TestCase):
# base object.
review3 = Review(source="Python Daily")
# initially, no db assigned
- self.assertEqual(review3._state.db, None)
+ self.assertIsNone(review3._state.db)
# Dive comes from 'other', so review3 is set to use the source of 'other'...
review3.content_object = dive