add test case when dict is passed

This commit is contained in:
Dhaval Mehta 2020-05-26 02:39:55 +05:30
parent 24d293f9bc
commit 91df8d29ab

View File

@ -174,3 +174,10 @@ class GenerateSchemaTests(TestCase):
call_command('generateschema', call_command('generateschema',
'--tag_objects={}'.format(tag_objects), '--tag_objects={}'.format(tag_objects),
stdout=self.out) stdout=self.out)
def test_rejects_invalid_dict_tag_objects(self):
tag_objects = '{"name": "pet", "description": "Pets operations"}'
with pytest.raises(AssertionError):
call_command('generateschema',
'--tag_objects={}'.format(tag_objects),
stdout=self.out)