def test_delete(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']}
}]
resp = await client.post('/item_types/', headers=headers, data=ujson.dumps(body))
resp = await client.get('/item_types/1/', headers=headers_without_content_type)
assert resp.status == 200
resp = await client.delete('/item_types/1/', headers=headers_without_content_type)
assert resp.status == 204
resp = await client.get('/item_types/1/', headers=headers_without_content_type)
assert resp.status == 404
评论列表
文章目录