Skip to content

Commit b7e15c4

Browse files
committed
service-layer test for add batch [test_add_batch]
1 parent 40bd56d commit b7e15c4

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

test_services.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ def commit(self):
3232
self.committed = True
3333

3434

35+
def test_add_batch():
36+
repo, session = FakeRepository([]), FakeSession()
37+
services.add_batch('b1', 'CRUNCHY-ARMCHAIR', 100, None, repo, session)
38+
assert repo.get('b1') is not None
39+
assert session.committed
40+
41+
3542
def test_returns_allocation():
3643
repo = FakeRepository.for_batch("batch1", "COMPLICATED-LAMP", 100, eta=None)
3744
result = services.allocate("o1", "COMPLICATED-LAMP", 10, repo, FakeSession())

0 commit comments

Comments
 (0)