summaryrefslogtreecommitdiff
path: root/tests/multiple_database
diff options
context:
space:
mode:
Diffstat (limited to 'tests/multiple_database')
-rw-r--r--tests/multiple_database/tests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/multiple_database/tests.py b/tests/multiple_database/tests.py
index 2a6a725472..946137dc12 100644
--- a/tests/multiple_database/tests.py
+++ b/tests/multiple_database/tests.py
@@ -1344,14 +1344,14 @@ class RouterTestCase(TestCase):
# If you create an object through a M2M relation, it will be
# written to the write database, even if the original object
# was on the read database
- alice = dive.authors.create(name='Alice')
+ alice = dive.authors.create(name='Alice', pk=3)
self.assertEqual(alice._state.db, 'default')
# Same goes for get_or_create, regardless of whether getting or creating
alice, created = dive.authors.get_or_create(name='Alice')
self.assertEqual(alice._state.db, 'default')
- bob, created = dive.authors.get_or_create(name='Bob')
+ bob, created = dive.authors.get_or_create(name='Bob', defaults={'pk': 4})
self.assertEqual(bob._state.db, 'default')
def test_o2o_cross_database_protection(self):