fixed tests to work in batch mode
This commit is contained in:
@ -77,7 +77,8 @@ def test_add(arg, request, u1_s2):
|
||||
print(r.content)
|
||||
assert r.status_code == arg[1]
|
||||
if r.status_code == 201:
|
||||
assert response['id'] == 1
|
||||
# ids can change when running multiple tests - changed assert to instruction
|
||||
assert response['instruction'] == 'test'
|
||||
r = c.get(reverse(DETAIL_URL, args={response['id']}))
|
||||
assert r.status_code == 404 # ingredient is not linked to a recipe and therefore cannot be accessed
|
||||
r = u1_s2.get(reverse(DETAIL_URL, args={response['id']}))
|
||||
|
Reference in New Issue
Block a user