We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 71a6fa3 commit 8f67133Copy full SHA for 8f67133
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 if b.reference == batchref),
25
+ None,
26
+ )
27
+
28
29
class FakeUnitOfWork(unit_of_work.AbstractUnitOfWork):
30
def __init__(self):
0 commit comments