diff --git a/tests/test_unit.py b/tests/test_unit.py index 1006e95..900d874 100644 --- a/tests/test_unit.py +++ b/tests/test_unit.py @@ -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 diff --git a/tests/test_unit_exception b/tests/test_unit_exception index a634ccd..dd68b02 100644 --- a/tests/test_unit_exception +++ b/tests/test_unit_exception @@ -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( @@ -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" + )