def test_get(self, init_db, headers, headers_without_content_type, client):
client = await client
body = [{
'name': 'test',
'stores': [{'id': 1}],
'schema': {'properties': {'test': {'type': 'string'}}, 'type': 'object', 'id_names': ['test']}
}]
await client.post('/item_types/', headers=headers, data=ujson.dumps(body))
resp = await client.get('/item_types/1/', headers=headers_without_content_type)
body[0]['id'] = 1
body[0]['available_filters'] = [{'name': 'test', 'schema': {'type': 'string'}}]
body[0]['stores'] = [{
'configuration': {'data_path': '/test'},
'country': 'test',
'id': 1,
'name': 'test'
}]
body[0]['store_items_class'] = None
assert resp.status == 200
assert await resp.json() == body[0]
评论列表
文章目录