Skip to content

Commit eded7eb

Browse files
committed
test commmits [second_services_test]
1 parent 15b9bf7 commit eded7eb

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test_services.py

+10
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,13 @@ def test_error_for_invalid_sku():
4141

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

0 commit comments

Comments
 (0)