Fix code style

This commit is contained in:
jhg14 2017-09-04 16:17:43 +01:00
parent 4345894445
commit 66b2c6149e

View File

@ -1136,13 +1136,13 @@ class Test5004UniqueChoiceField(TestCase):
assert not serializer.is_valid() assert not serializer.is_valid()
assert serializer.errors == {'name': ['unique choice model with this name already exists.']} assert serializer.errors == {'name': ['unique choice model with this name already exists.']}
class TestFieldSource(TestCase): class TestFieldSource(TestCase):
def test_named_field_source(self): def test_named_field_source(self):
class TestSerializer(serializers.ModelSerializer): class TestSerializer(serializers.ModelSerializer):
class Meta: class Meta:
model = RegularFieldsModel model = RegularFieldsModel
fields = ('number_field',) fields = ('number_field',)
extra_kwargs = { extra_kwargs = {
'number_field': { 'number_field': {
@ -1156,4 +1156,3 @@ class TestFieldSource(TestCase):
""") """)
self.maxDiff = None self.maxDiff = None
self.assertEqual(unicode_repr(TestSerializer()), expected) self.assertEqual(unicode_repr(TestSerializer()), expected)