mirror of
https://github.com/d3vyce/taskiq-deduplication.git
synced 2026-08-04 19:14:07 +00:00
fix: replace assert with RuntimeError for missing startup and document lifecycle requirement (#16)
This commit is contained in:
@@ -326,3 +326,9 @@ class TestLifecycle:
|
||||
async def test_shutdown_without_startup_is_safe(self):
|
||||
mw = RedisDeduplicationMiddleware(redis_url="redis://localhost")
|
||||
await mw.shutdown()
|
||||
|
||||
@pytest.mark.anyio
|
||||
async def test_pre_send_without_startup_raises_runtime_error(self, make_message):
|
||||
mw = RedisDeduplicationMiddleware(redis_url="redis://localhost")
|
||||
with pytest.raises(RuntimeError, match="startup"):
|
||||
await mw.pre_send(make_message())
|
||||
|
||||
Reference in New Issue
Block a user