Fix warnings when running tests (#4047)

This commit is contained in:
Phivos Stylianides 2016-04-11 16:13:11 +03:00 committed by Tom Christie
parent d87f2bc7b6
commit 08dad04b19
3 changed files with 7 additions and 6 deletions

1
.gitignore vendored
View File

@ -11,6 +11,7 @@
/*.egg-info/
/env/
MANIFEST
coverage.*
!.gitignore
!.travis.yml

View File

@ -14,13 +14,13 @@ class NestedSerializer(serializers.Serializer):
two = serializers.IntegerField(max_value=10)
class TestNestedSerializerSerializer(serializers.Serializer):
class NestedSerializerTestSerializer(serializers.Serializer):
nested = NestedSerializer()
class NestedSerializersView(ListCreateAPIView):
renderer_classes = (BrowsableAPIRenderer, )
serializer_class = TestNestedSerializerSerializer
serializer_class = NestedSerializerTestSerializer
queryset = [{'nested': {'one': 1, 'two': 2}}]

View File

@ -784,7 +784,7 @@ class TestBulkCreate(TestCase):
assert serializer.data == data
class TestMetaClassModel(models.Model):
class MetaClassTestModel(models.Model):
text = models.CharField(max_length=100)
@ -792,7 +792,7 @@ class TestSerializerMetaClass(TestCase):
def test_meta_class_fields_option(self):
class ExampleSerializer(serializers.ModelSerializer):
class Meta:
model = TestMetaClassModel
model = MetaClassTestModel
fields = 'text'
with self.assertRaises(TypeError) as result:
@ -806,7 +806,7 @@ class TestSerializerMetaClass(TestCase):
def test_meta_class_exclude_option(self):
class ExampleSerializer(serializers.ModelSerializer):
class Meta:
model = TestMetaClassModel
model = MetaClassTestModel
exclude = 'text'
with self.assertRaises(TypeError) as result:
@ -820,7 +820,7 @@ class TestSerializerMetaClass(TestCase):
def test_meta_class_fields_and_exclude_options(self):
class ExampleSerializer(serializers.ModelSerializer):
class Meta:
model = TestMetaClassModel
model = MetaClassTestModel
fields = ('text',)
exclude = ('text',)