diff --git a/.requirements/requirements.txt b/.requirements/requirements.txt index 2b8a94a..d6f0ab3 100644 --- a/.requirements/requirements.txt +++ b/.requirements/requirements.txt @@ -1,6 +1,6 @@ colorama==0.4.6 ; python_version >= "3.10" and python_version < "4.0" and sys_platform == "win32" dynaconf==3.2.0 ; python_version >= "3.10" and python_version < "4.0" -emoji==2.6.0 ; python_version >= "3.10" and python_version < "4.0" +emoji==2.7.0 ; python_version >= "3.10" and python_version < "4.0" loguru==0.7.0 ; python_version >= "3.10" and python_version < "4.0" pyparsing==3.1.0 ; python_version >= "3.10" and python_version < "4.0" win32-setctime==1.1.0 ; python_version >= "3.10" and python_version < "4.0" and sys_platform == "win32" diff --git a/examples/example.py b/examples/example.py index 9481a35..477204a 100644 --- a/examples/example.py +++ b/examples/example.py @@ -3,13 +3,16 @@ """ import asyncio -import logging +import sys import uvicorn from fastapi import FastAPI +from loguru import logger from findmyorder import FindMyOrder, __version__ +logger.remove() +logger.add(sys.stderr, level="INFO") async def main(): """Main""" diff --git a/pyproject.toml b/pyproject.toml index 7f3cd98..44fb65e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,6 +61,7 @@ pytest = "^7.0" pytest-cov = "^4.1" pytest-asyncio = "^0.21.0" pytest-mock = "^3.11.1" +pytest-loguru = "^0.2.0" [tool.poetry.group.docs] optional = true diff --git a/tests/test_unit.py b/tests/test_unit.py index a5a525b..d7481c4 100644 --- a/tests/test_unit.py +++ b/tests/test_unit.py @@ -186,12 +186,19 @@ async def test_short_valid_get_order(fmo, short_order, result_order): @pytest.mark.asyncio -async def test_ignore_eorder(fmo, ignore_order): +async def test_ignore_order(fmo, ignore_order): """ignore order Testing""" result = await fmo.get_order(ignore_order) assert result is None +@pytest.mark.asyncio +async def test_invalid_get_order(fmo, invalid_order): + """ignore order Testing""" + result = await fmo.get_order(invalid_order) + assert result is None + + @pytest.mark.asyncio async def test_mapping_order( fmo,