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:21:14 -0400
commit13d60298ea2a07242dc3952a9dfcd9c8857bf1f9 (patch)
tree230d0f843401781e9b2062fe3c1f929655a5527e /tests/multiple_database
parent70b7d6b4ea0cbd67406d193f0a7fed7e290d1eb6 (diff)
[1.10.x] Fixed #26747 -- Used more specific assertions in the Django test suite.
Backport of 4f336f66523001b009ab038b10848508fd208b3b from master
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