We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9a74b16 commit 5be7bcfCopy full SHA for 5be7bcf
test_batches.py
@@ -0,0 +1,11 @@
1
+from model import Batch, OrderLine
2
+from datetime import date
3
+
4
5
+def test_allocating_to_a_batch_reduces_the_available_quantity():
6
+ batch = Batch("batch-001", "SMALL-TABLE", qty=20, eta=date.today())
7
+ line = OrderLine("order-ref", "SMALL-TABLE", 2)
8
9
+ batch.allocate(line)
10
11
+ assert batch.available_quantity == 18
0 commit comments