コード例 #1
0
ファイル: test_utils.py プロジェクト: thanhliem89dn/ramses
 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)
コード例 #2
0
ファイル: test_utils.py プロジェクト: thanhliem89dn/ramses
 def test_convert_schema_xml(self):
     assert utils.convert_schema({'foo': 'bar'}, 'text/xml') is None
コード例 #3
0
ファイル: test_utils.py プロジェクト: thanhliem89dn/ramses
 def test_convert_schema_json(self):
     schema = utils.convert_schema({'foo': 'bar'}, 'application/json')
     assert schema == {'foo': 'bar'}