Example #1
0
 def test_convert_schema_json_error(self):
     with pytest.raises(TypeError) as ex:
         utils.convert_schema('foo', 'application/json')
     assert 'Schema is not a valid JSON' in str(ex.value)
Example #2
0
 def test_convert_schema_xml(self):
     assert utils.convert_schema({'foo': 'bar'}, 'text/xml') is None
Example #3
0
 def test_convert_schema_json(self):
     schema = utils.convert_schema({'foo': 'bar'}, 'application/json')
     assert schema == {'foo': 'bar'}