added food test

This commit is contained in:
vabene1111
2021-03-11 18:23:00 +01:00
parent 7e38e946a5
commit fdcdf6a026
3 changed files with 152 additions and 72 deletions

View File

@@ -50,13 +50,13 @@ def test_list_filter(obj_1, obj_2, u1_s1):
assert len(response) == 2
assert response[0]['name'] == obj_1.name
response = json.loads(u1_s1.get(f'{reverse("api:keyword-list")}?limit=1').content)
response = json.loads(u1_s1.get(f'{reverse(LIST_URL)}?limit=1').content)
assert len(response) == 1
response = json.loads(u1_s1.get(f'{reverse("api:keyword-list")}?query=chicken').content)
response = json.loads(u1_s1.get(f'{reverse(LIST_URL)}?query=chicken').content)
assert len(response) == 0
response = json.loads(u1_s1.get(f'{reverse("api:keyword-list")}?query={obj_1.name[4:]}').content)
response = json.loads(u1_s1.get(f'{reverse(LIST_URL)}?query={obj_1.name[4:]}').content)
assert len(response) == 1