aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_relations.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_relations.py')
-rw-r--r--tests/test_relations.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_relations.py b/tests/test_relations.py
index bc1db69f..501a9208 100644
--- a/tests/test_relations.py
+++ b/tests/test_relations.py
@@ -102,7 +102,7 @@ class RelatedFieldSourceTests(TestCase):
self.assertEqual(value, ['BlogPost object'])
# Regression for #1129
- def test_exception_for_incorect_fk(self):
+ def test_exception_for_incorrect_fk(self):
"""
Check that the exception message are correct if the source field
doesn't exist.
@@ -123,8 +123,9 @@ class RelatedFieldSourceTests(TestCase):
(serializers.ModelSerializer,),
attrs
)
+ serializer = TestSerializer(data={'name': 'foo'})
with self.assertRaises(AttributeError):
- TestSerializer(data={'name': 'foo'})
+ serializer.fields
@unittest.skipIf(get_version() < '1.6.0', 'Upstream behaviour changed in v1.6')