Skip to content

Commit 8fcb8d6

Browse files
auvipytomchristie
authored andcommitted
converted metadata test asserts to pytest (encode#4806)
1 parent dd11bd4 commit 8fcb8d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_metadata.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ class TestSimpleMetadataFieldInfo(TestCase):
268268
def test_null_boolean_field_info_type(self):
269269
options = metadata.SimpleMetadata()
270270
field_info = options.get_field_info(serializers.NullBooleanField())
271-
self.assertEqual(field_info['type'], 'boolean')
271+
assert field_info['type'] == 'boolean'
272272

273273
def test_related_field_choices(self):
274274
options = metadata.SimpleMetadata()
@@ -277,7 +277,7 @@ def test_related_field_choices(self):
277277
field_info = options.get_field_info(
278278
serializers.RelatedField(queryset=BasicModel.objects.all())
279279
)
280-
self.assertNotIn('choices', field_info)
280+
assert 'choices' not in field_info
281281

282282

283283
class TestModelSerializerMetadata(TestCase):

0 commit comments

Comments
 (0)