Permalink
Browse files

converted metadata test asserts to pytest (#4806)

  • Loading branch information...
1 parent dd11bd4 commit 8fcb8d6350ac4337db066ddbb9b2b76ee0cd43c8 @auvipy auvipy committed with Jan 12, 2017
Showing with 2 additions and 2 deletions.
  1. +2 −2 tests/test_metadata.py
@@ -268,7 +268,7 @@ class TestSimpleMetadataFieldInfo(TestCase):
def test_null_boolean_field_info_type(self):
options = metadata.SimpleMetadata()
field_info = options.get_field_info(serializers.NullBooleanField())
- self.assertEqual(field_info['type'], 'boolean')
+ assert field_info['type'] == 'boolean'
def test_related_field_choices(self):
options = metadata.SimpleMetadata()
@@ -277,7 +277,7 @@ def test_related_field_choices(self):
field_info = options.get_field_info(
serializers.RelatedField(queryset=BasicModel.objects.all())
)
- self.assertNotIn('choices', field_info)
+ assert 'choices' not in field_info
class TestModelSerializerMetadata(TestCase):

0 comments on commit 8fcb8d6

Please sign in to comment.