def test_delete_valid(self, init_db, client, headers, headers_without_content_type):
client = await client
body = [{
'store_id': 1,
'name': 'Placement Test',
'variations': [{
'name': 'Var 1',
'_operation': 'insert',
'slots': [{'id': 1}]
}]
}]
resp = await client.post('/placements/', headers=headers, data=ujson.dumps(body))
obj = (await resp.json())[0]
resp = await client.get('/placements/{}/'.format(obj['small_hash']), headers=headers_without_content_type)
assert resp.status == 200
resp = await client.delete('/placements/{}/'.format(obj['small_hash']), headers=headers_without_content_type)
assert resp.status == 204
resp = await client.get('/placements/{}/'.format(obj['small_hash']), headers=headers_without_content_type)
assert resp.status == 404
评论列表
文章目录