Skip to content

Commit 8fd9276

Browse files
committed
sneak in a redis patch so unit test dont need redis
1 parent 49dba97 commit 8fd9276

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/unit/test_handlers.py

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

6060

61+
62+
@pytest.fixture(autouse=True)
63+
def fake_redis_publish():
64+
with mock.patch("allocation.adapters.redis_eventpublisher.publish"):
65+
yield
66+
67+
68+
6169
class TestAllocate:
6270

6371
def test_allocates(self):

0 commit comments

Comments
 (0)