1 parent 3be8292 commit 6b767c1Copy full SHA for 6b767c1
1 file changed
tests/unit/test_services.py
@@ -16,6 +16,12 @@ def _add(self, product):
16
def _get(self, sku):
17
return next((p for p in self._products if p.sku == sku), None)
18
19
+ def _get_by_batchref(self, batchref):
20
+ return next((
21
+ p for p in self._products for b in p.batches
22
+ if b.reference == batchref
23
+ ), None)
24
+
25
26
class FakeUnitOfWork(unit_of_work.AbstractUnitOfWork):
27
0 commit comments