Skip to content

Commit 9bd4a60

Browse files
committed
sneak in a redis patch so unit test dont need redis
1 parent c063c27 commit 9bd4a60

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

tests/unit/test_handlers.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ def test_for_existing_product(self):
5353
assert "b2" in [b.reference for b in uow.products.get("GARISH-RUG").batches]
5454

5555

56+
@pytest.fixture(autouse=True)
57+
def fake_redis_publish():
58+
with mock.patch("allocation.adapters.redis_eventpublisher.publish"):
59+
yield
60+
61+
5662
class TestAllocate:
5763
def test_allocates(self):
5864
uow = FakeUnitOfWork()

0 commit comments

Comments
 (0)