summaryrefslogtreecommitdiff
path: root/tests/multiple_database
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2017-07-31 13:28:14 -0400
committerTim Graham <timograham@gmail.com>2017-07-31 13:28:29 -0400
commite3bd328b0f8cacea06cb94dfa63996144279df52 (patch)
treee4e4b0dda379c27840ba41f80cac24b97b8549bb /tests/multiple_database
parentaadd3aeb2ba3153e35bd805c80c901f289a6f333 (diff)
downloaddjango-e3bd328b0f8cacea06cb94dfa63996144279df52.tar.gz
Removed a primary key value dependency in a multiple_database test.
Follow up to a51c4de1945be2225f20fad794cfb52d8f1f9236.
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 8c4e8a8d8c..50859a3dc6 100644
--- a/tests/multiple_database/tests.py
+++ b/tests/multiple_database/tests.py
@@ -672,8 +672,8 @@ class QueryTestCase(TestCase):
# Set a one-to-one relation with an object from a different database
alice_profile = UserProfile.objects.using('default').create(user=alice, flavor='chocolate')
msg = (
- 'Cannot assign "<UserProfile: UserProfile object (1)>": the '
- 'current database router prevents this relation.'
+ 'Cannot assign "%r": the current database router prevents this '
+ 'relation.' % alice_profile
)
with self.assertRaisesMessage(ValueError, msg):
bob.userprofile = alice_profile