Skip to content

Commit f981188

Browse files
committed
Remove old test code
1 parent c6cade0 commit f981188

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

tests/test_jsonfield.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from collections import OrderedDict
33
from decimal import Decimal
44

5-
import django
65
from django.core.serializers import deserialize, serialize
76
from django.core.serializers.base import DeserializationError
87
from django.forms import ValidationError
@@ -195,12 +194,7 @@ def test_invalid_json(self):
195194
'"fields": {"json": "{]", "default_json": "{]"}}]'
196195
with self.assertRaises(DeserializationError) as cm:
197196
next(deserialize('json', ser))
198-
# Django 2 does not reraise DeserializationError as another DeserializationError
199-
# Changed in: https://github.com/django/django/pull/7878
200-
if django.VERSION < (2, 0,):
201-
inner = cm.exception.__context__.__context__
202-
else:
203-
inner = cm.exception.__context__
197+
inner = cm.exception.__context__
204198
self.assertIsInstance(inner, ValidationError)
205199
self.assertEqual('Enter valid JSON.', inner.messages[0])
206200

0 commit comments

Comments
 (0)