1 parent a097126 commit 679a763Copy full SHA for 679a763
1 file changed
tests/unit/test_handlers.py
@@ -19,6 +19,12 @@ def _add(self, product):
19
def _get(self, sku):
20
return next((p for p in self._products if p.sku == sku), None)
21
22
+ def _get_by_batchref(self, batchref):
23
+ return next((
24
+ p for p in self._products for b in p.batches
25
+ if b.reference == batchref
26
+ ), None)
27
+
28
29
class FakeUnitOfWork(unit_of_work.AbstractUnitOfWork):
30
0 commit comments