async def test_subscribe(self, redis_store: Store, tree_a): tree_a.register_event("my_channel") redis_store.publish("my_channel", "new pool added") await asyncio.gather(tree_a.run(), wait_and_stop(tree_a)) assert redis_store.get(a_times_ran) == 1
def test_publish(self, local_store: Store): with pytest.raises(StateError): local_store.publish("random channel", "random message")