summaryrefslogtreecommitdiff
path: root/tests/update/tests.py
diff options
context:
space:
mode:
authorMads Jensen <mje@inducks.org>2017-05-28 21:37:21 +0200
committerTim Graham <timograham@gmail.com>2017-07-29 19:07:23 -0400
commita51c4de1945be2225f20fad794cfb52d8f1f9236 (patch)
tree36386b70a27cf027a8a491de319c3e59e0d3d0cd /tests/update/tests.py
parent38988f289f7f5708f5ea85de2d5dfe0d86b23106 (diff)
Used assertRaisesMessage() to test Django's error messages.
Diffstat (limited to 'tests/update/tests.py')
-rw-r--r--tests/update/tests.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/update/tests.py b/tests/update/tests.py
index ba7ffd5c88..923af40305 100644
--- a/tests/update/tests.py
+++ b/tests/update/tests.py
@@ -123,7 +123,8 @@ class AdvancedTests(TestCase):
We do not support update on already sliced query sets.
"""
method = DataPoint.objects.all()[:2].update
- with self.assertRaises(AssertionError):
+ msg = 'Cannot update a query once a slice has been taken.'
+ with self.assertRaisesMessage(AssertionError, msg):
method(another_value='another thing')
def test_update_respects_to_field(self):