aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_model_serializer.py
diff options
context:
space:
mode:
authorTom Christie2015-02-13 13:38:44 +0000
committerTom Christie2015-02-13 13:38:44 +0000
commit4248a8d3fc725d9ae3fe7aaaad7ee12479ab07ab (patch)
treec38485aec717a35de8691c3d55bd50ba3e4aae6d /tests/test_model_serializer.py
parent84260b5dd66cc31858898ff11d5300a73083cca1 (diff)
parentad32e14360a23ee3e93ff54ca206c64009d184c9 (diff)
downloaddjango-rest-framework-4248a8d3fc725d9ae3fe7aaaad7ee12479ab07ab.tar.bz2
Merge pull request #2198 from tomchristie/version-3.1
Version 3.1
Diffstat (limited to 'tests/test_model_serializer.py')
-rw-r--r--tests/test_model_serializer.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_model_serializer.py b/tests/test_model_serializer.py
index 247b309a..bce2008a 100644
--- a/tests/test_model_serializer.py
+++ b/tests/test_model_serializer.py
@@ -216,7 +216,7 @@ class TestRegularFieldMappings(TestCase):
with self.assertRaises(ImproperlyConfigured) as excinfo:
TestSerializer().fields
- expected = 'Field name `invalid` is not valid for model `ModelBase`.'
+ expected = 'Field name `invalid` is not valid for model `RegularFieldsModel`.'
assert str(excinfo.exception) == expected
def test_missing_field(self):
@@ -234,8 +234,8 @@ class TestRegularFieldMappings(TestCase):
with self.assertRaises(AssertionError) as excinfo:
TestSerializer().fields
expected = (
- 'Field `missing` has been declared on serializer '
- '`TestSerializer`, but is missing from `Meta.fields`.'
+ "The field 'missing' was declared on serializer TestSerializer, "
+ "but has not been included in the 'fields' option."
)
assert str(excinfo.exception) == expected
@@ -637,5 +637,5 @@ class TestSerializerMetaClass(TestCase):
exception = result.exception
self.assertEqual(
str(exception),
- "Cannot set both 'fields' and 'exclude'."
+ "Cannot set both 'fields' and 'exclude' options on serializer ExampleSerializer."
)