Skip to content

Commit ecb58c2

Browse files
committed
test commmits [second_services_test]
1 parent 1b27dfb commit ecb58c2

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎test_services.py‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,13 @@ def test_error_for_invalid_sku():
4242

4343
with pytest.raises(services.InvalidSku, match="Invalid sku NONEXISTENTSKU"):
4444
services.allocate(line, repo, FakeSession())
45+
46+
47+
def test_commits():
48+
line = model.OrderLine('o1', 'sku1', 10)
49+
batch = model.Batch('b1', 'sku1', 100, eta=None)
50+
repo = FakeRepository([batch])
51+
session = FakeSession()
52+
53+
services.allocate(line, repo, session)
54+
assert session.committed is True

0 commit comments

Comments
 (0)