Skip to content

Commit

Permalink
✅ Unit Test
Browse files Browse the repository at this point in the history
  • Loading branch information
mraniki committed Jul 7, 2024
1 parent b654144 commit 7d03370
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/test_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ async def test_standard_get_order(fmo, order, result_order):


async def test_create_client_exception(fmo, caplog):
result = fmo.create_client(parser_library="none")
result = fmo.create_client()
assert result is not None
assert any(
record.message
Expand Down
12 changes: 11 additions & 1 deletion tests/test_unit_exception
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def fmo():
return FindMyOrder()


async def test_create_client_exception(fmo, caplog):
async def test_module_exception(fmo, caplog):
result = fmo.create_client(parser_library="none")
assert result is not None
assert any(
Expand All @@ -29,3 +29,13 @@ async def test_create_client_exception(fmo, caplog):
)


async def test_create_client_exception(fmo, caplog):
fmo.enabled = True
result = fmo.create_client()
assert result is not None
assert any(
record.message
== "No Client were created. Check your settings or disable the module."
for record in caplog.records
if record.levelname == "WARNING"
)

0 comments on commit 7d03370

Please sign in to comment.