From 13d60298ea2a07242dc3952a9dfcd9c8857bf1f9 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Thu, 16 Jun 2016 11:19:18 -0700 Subject: [1.10.x] Fixed #26747 -- Used more specific assertions in the Django test suite. Backport of 4f336f66523001b009ab038b10848508fd208b3b from master --- tests/multiple_database/tests.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/multiple_database') 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 -- cgit v1.3