Skip to content

Commit

Permalink
Merge pull request #40 from igoose1/39-explicit-url
Browse files Browse the repository at this point in the history
  • Loading branch information
s3rius authored Sep 1, 2023
2 parents 419d620 + 43da3cb commit c02b4f5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion taskiq_redis/redis_broker.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class BaseRedisBroker(AsyncBroker):

def __init__(
self,
url: Optional[str] = None,
url: str,
task_id_generator: Optional[Callable[[], str]] = None,
result_backend: Optional[AsyncResultBackend[_T]] = None,
queue_name: str = "taskiq",
Expand Down
6 changes: 6 additions & 0 deletions tests/test_broker.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
from taskiq_redis import ListQueueBroker, PubSubBroker


def test_no_url_should_raise_typeerror() -> None:
"""Test that url is expected."""
with pytest.raises(TypeError):
ListQueueBroker() # type: ignore


async def get_message( # type: ignore
broker: AsyncBroker,
) -> Union[bytes, AckableMessage]:
Expand Down

0 comments on commit c02b4f5

Please sign in to comment.