summaryrefslogtreecommitdiff
path: root/tests/reverse_lookup/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/reverse_lookup/tests.py')
-rw-r--r--tests/reverse_lookup/tests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/reverse_lookup/tests.py b/tests/reverse_lookup/tests.py
index 1b9184d682..dda3c29691 100644
--- a/tests/reverse_lookup/tests.py
+++ b/tests/reverse_lookup/tests.py
@@ -48,5 +48,5 @@ class ReverseLookupTests(TestCase):
"""
If a related_name is given you can't use the field name instead
"""
- self.assertRaises(FieldError, Poll.objects.get,
- choice__name__exact="This is the answer")
+ with self.assertRaises(FieldError):
+ Poll.objects.get(choice__name__exact="This is the answer")