diff options
| author | Tom Christie | 2011-12-30 15:32:49 +0000 |
|---|---|---|
| committer | Tom Christie | 2011-12-30 15:33:13 +0000 |
| commit | 904f197474ad3561d3d273961a70ab19d8175aaf (patch) | |
| tree | 55772b29ae4bca2d99cba2c95d0f3d72676ea9fa /djangorestframework/tests/validators.py | |
| parent | da42c4fe878afa36e52d1d9b8aa150f9e30bad59 (diff) | |
| download | django-rest-framework-904f197474ad3561d3d273961a70ab19d8175aaf.tar.bz2 | |
Replace field-errors with field_errors
Diffstat (limited to 'djangorestframework/tests/validators.py')
| -rw-r--r-- | djangorestframework/tests/validators.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/djangorestframework/tests/validators.py b/djangorestframework/tests/validators.py index 1f696422..18c8c313 100644 --- a/djangorestframework/tests/validators.py +++ b/djangorestframework/tests/validators.py @@ -149,7 +149,7 @@ class TestFormValidation(TestCase): try: validator.validate_request(content, None) except ErrorResponse, exc: - self.assertEqual(exc.response.raw_content, {'field-errors': {'qwerty': ['This field is required.']}}) + self.assertEqual(exc.response.raw_content, {'field_errors': {'qwerty': ['This field is required.']}}) else: self.fail('ResourceException was not raised') #pragma: no cover @@ -159,7 +159,7 @@ class TestFormValidation(TestCase): try: validator.validate_request(content, None) except ErrorResponse, exc: - self.assertEqual(exc.response.raw_content, {'field-errors': {'qwerty': ['This field is required.']}}) + self.assertEqual(exc.response.raw_content, {'field_errors': {'qwerty': ['This field is required.']}}) else: self.fail('ResourceException was not raised') #pragma: no cover @@ -169,7 +169,7 @@ class TestFormValidation(TestCase): try: validator.validate_request(content, None) except ErrorResponse, exc: - self.assertEqual(exc.response.raw_content, {'field-errors': {'extra': ['This field does not exist.']}}) + self.assertEqual(exc.response.raw_content, {'field_errors': {'extra': ['This field does not exist.']}}) else: self.fail('ResourceException was not raised') #pragma: no cover @@ -179,7 +179,7 @@ class TestFormValidation(TestCase): try: validator.validate_request(content, None) except ErrorResponse, exc: - self.assertEqual(exc.response.raw_content, {'field-errors': {'qwerty': ['This field is required.'], + self.assertEqual(exc.response.raw_content, {'field_errors': {'qwerty': ['This field is required.'], 'extra': ['This field does not exist.']}}) else: self.fail('ResourceException was not raised') #pragma: no cover |
