Permalink
Browse files

Fix warnings when running tests (#4047)

  • Loading branch information...
1 parent d87f2bc commit 08dad04b1989c69295a3536e186e480fde42e460 @stphivos stphivos committed with Apr 11, 2016
Showing with 7 additions and 6 deletions.
  1. +1 −0 .gitignore
  2. +2 −2 tests/browsable_api/test_browsable_nested_api.py
  3. +4 −4 tests/test_model_serializer.py
View
@@ -11,6 +11,7 @@
/*.egg-info/
/env/
MANIFEST
+coverage.*
!.gitignore
!.travis.yml
@@ -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}}]
@@ -784,15 +784,15 @@ class BulkCreateSerializer(serializers.ListSerializer):
assert serializer.data == data
-class TestMetaClassModel(models.Model):
+class MetaClassTestModel(models.Model):
text = models.CharField(max_length=100)
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 Meta:
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 Meta:
def test_meta_class_fields_and_exclude_options(self):
class ExampleSerializer(serializers.ModelSerializer):
class Meta:
- model = TestMetaClassModel
+ model = MetaClassTestModel
fields = ('text',)
exclude = ('text',)

0 comments on commit 08dad04

Please sign in to comment.