Skip to content

Commit bd0e75e

Browse files
committed
simple deallocate test
1 parent d817ecd commit bd0e75e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test_batches.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,10 @@ def test_cannot_allocate_if_skus_do_not_match():
3434
batch = Batch("batch-001", "UNCOMFORTABLE-CHAIR", 100, eta=None)
3535
different_sku_line = OrderLine("order-123", "EXPENSIVE-TOASTER", 10)
3636
assert batch.can_allocate(different_sku_line) is False
37+
38+
39+
def test_deallocate():
40+
batch, line = make_batch_and_line("EXPENSIVE-FOOTSTOOL", 20, 2)
41+
batch.allocate(line)
42+
batch.deallocate(line)
43+
assert batch.available_quantity == 20

0 commit comments

Comments
 (0)