Skip to content

Commit fc79aff

Browse files
committed
fix redis e2e test
1 parent 92338cc commit fc79aff

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/e2e/test_external_events.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ def test_change_batch_quantity_leading_to_reallocation():
1414
orderid, sku = random_orderid(), random_sku()
1515
earlier_batch, later_batch = random_batchref('old'), random_batchref('newer')
1616
api_client.post_to_add_batch(earlier_batch, sku, qty=10, eta='2011-01-02')
17-
api_client.post_to_add_batch(later_batch, sku, qty=10, eta='2011-01-02')
18-
response = api_client.post_to_allocate(orderid, sku, 10)
19-
assert response.json()['batchref'] == earlier_batch
17+
api_client.post_to_add_batch(later_batch, sku, qty=10, eta='2011-01-03')
18+
r = api_client.post_to_allocate(orderid, sku, 10)
19+
assert r.ok
20+
response = api_client.get_allocation(orderid)
21+
assert response.json()[0]['batchref'] == earlier_batch
2022

2123
subscription = redis_client.subscribe_to('line_allocated')
2224

0 commit comments

Comments
 (0)