Skip to content

Commit 608894e

Browse files
committed
products if else statment
1 parent 8995319 commit 608894e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test_cart_api.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,9 @@ def test_post_cart_with_ai(self):
7575
assert resp.status_code == HTTPStatus.OK
7676
res = resp.json()
7777
check.is_in('userId', res)
78-
78+
79+
if input_data.get('products'):
80+
check.equal(res['products'][0]['title'], input_data['products'][0]['title'])
81+
check.equal(res['products'][0]['category'], input_data['products'][0]['category'])
82+
else:
83+
check.equal(res['products'], [])

0 commit comments

Comments
 (0)