Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mraniki committed Jul 25, 2023
1 parent a94a541 commit 8f4aed7
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions tests/test_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,27 +99,27 @@ async def test_run_bot(caplog):
await task


@pytest.mark.asyncio
async def test_get_latest_message(message):
listener = Listener()
await listener.start()
assert listener is not None
assert settings.VALUE == "On Testing"
await listener.handler.handle_message(message)
assert await listener.handler.get_latest_message() == message


@pytest.mark.asyncio
async def test_listener_handler():
listener_test = Listener()
print(listener_test)
assert listener_test is not None
assert isinstance(listener_test, Listener)
await listener_test.start()
await listener_test.handler.handle_message("hello")
msg = await listener_test.handler.get_latest_message()
print(msg)
assert msg == "hello"
# @pytest.mark.asyncio
# async def test_get_latest_message(message):
# listener = Listener()
# await listener.start()
# assert listener is not None
# assert settings.VALUE == "On Testing"
# await listener.handler.handle_message(message)
# assert await listener.handler.get_latest_message() == message


# @pytest.mark.asyncio
# async def test_listener_handler():
# listener_test = Listener()
# print(listener_test)
# assert listener_test is not None
# assert isinstance(listener_test, Listener)
# await listener_test.start()
# await listener_test.handler.handle_message("hello")
# msg = await listener_test.handler.get_latest_message()
# print(msg)
# assert msg == "hello"


@pytest.mark.asyncio
Expand Down

0 comments on commit 8f4aed7

Please sign in to comment.