Skip to content

Commit 5be7bcf

Browse files
committed
first test [first_test]
1 parent 9a74b16 commit 5be7bcf

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test_batches.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)