mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-25 19:14:01 +03:00
Fixed python 2.6 compatibility
This commit is contained in:
parent
bf25a6ecbc
commit
085c3e8a2b
|
@ -121,7 +121,7 @@ class TestNestedSerializerWithMany:
|
||||||
serializer = self.get_serializer(input_data)
|
serializer = self.get_serializer(input_data)
|
||||||
|
|
||||||
assert not serializer.is_valid()
|
assert not serializer.is_valid()
|
||||||
assert set(serializer.errors) == {'nested'}
|
assert set(serializer.errors) == set(['nested'])
|
||||||
assert serializer.errors['nested'][0] == serializer.error_messages['null']
|
assert serializer.errors['nested'][0] == serializer.error_messages['null']
|
||||||
|
|
||||||
def test_run_the_field_validation_even_if_the_field_is_null(self):
|
def test_run_the_field_validation_even_if_the_field_is_null(self):
|
||||||
|
@ -132,7 +132,7 @@ class TestNestedSerializerWithMany:
|
||||||
serializer = self.get_serializer(input_data, condition_to_allow_null=False)
|
serializer = self.get_serializer(input_data, condition_to_allow_null=False)
|
||||||
|
|
||||||
assert not serializer.is_valid()
|
assert not serializer.is_valid()
|
||||||
assert set(serializer.errors) == {'payment_info'}
|
assert set(serializer.errors) == set(['payment_info'])
|
||||||
assert serializer.errors['payment_info'][0] == serializer.ERROR_MESSAGE
|
assert serializer.errors['payment_info'][0] == serializer.ERROR_MESSAGE
|
||||||
|
|
||||||
def test_expected_results_if_not_null(self):
|
def test_expected_results_if_not_null(self):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user