From 1f2808e46d7ce8b15f8a14eb32a502778b8799cf Mon Sep 17 00:00:00 2001 From: GLEF1X Date: Wed, 21 Dec 2022 16:39:40 -0500 Subject: [PATCH] :rocket: [refactoring]: flatten structure of project `glQiwiApi/core/event_fetching` -> `glQiwiApi/event_fetching` --- .gitignore | 1 + glQiwiApi/core/__init__.py | 37 ------------------- .../{core => }/event_fetching/__init__.py | 0 .../event_fetching/class_based/__init__.py | 0 .../event_fetching/class_based/base.py | 0 .../event_fetching/class_based/bill.py | 0 .../event_fetching/class_based/error.py | 0 .../event_fetching/class_based/transaction.py | 0 .../class_based/webhook_transaction.py | 0 .../{core => }/event_fetching/dispatcher.py | 6 +-- .../{core => }/event_fetching/executor.py | 6 +-- .../{core => }/event_fetching/filters.py | 0 .../event_fetching/webhooks/__init__.py | 0 .../{core => }/event_fetching/webhooks/app.py | 18 ++++----- .../event_fetching/webhooks/config.py | 0 .../event_fetching/webhooks/dto/__init__.py | 0 .../event_fetching/webhooks/dto/errors.py | 0 .../webhooks/middlewares/__init__.py | 0 .../event_fetching/webhooks/middlewares/ip.py | 4 +- .../webhooks/services/__init__.py | 0 .../webhooks/services/collision_detector.py | 0 .../webhooks/services/security/__init__.py | 0 .../webhooks/services/security/ip.py | 0 .../event_fetching/webhooks/utils.py | 2 +- .../event_fetching/webhooks/views/__init__.py | 0 .../event_fetching/webhooks/views/base.py | 6 +-- .../webhooks/views/bill_view.py | 2 +- .../webhooks/views/transaction_view.py | 4 +- playground.py | 10 ----- .../test_webhook/test_app.py | 10 ++--- .../test_services/test_collision_detector.py | 2 +- .../test_webhook/test_views/test_p2p_view.py | 6 +-- .../test_webhook/test_views/test_txn_view.py | 6 +-- 33 files changed, 36 insertions(+), 84 deletions(-) rename glQiwiApi/{core => }/event_fetching/__init__.py (100%) rename glQiwiApi/{core => }/event_fetching/class_based/__init__.py (100%) rename glQiwiApi/{core => }/event_fetching/class_based/base.py (100%) rename glQiwiApi/{core => }/event_fetching/class_based/bill.py (100%) rename glQiwiApi/{core => }/event_fetching/class_based/error.py (100%) rename glQiwiApi/{core => }/event_fetching/class_based/transaction.py (100%) rename glQiwiApi/{core => }/event_fetching/class_based/webhook_transaction.py (100%) rename glQiwiApi/{core => }/event_fetching/dispatcher.py (95%) rename glQiwiApi/{core => }/event_fetching/executor.py (98%) rename glQiwiApi/{core => }/event_fetching/filters.py (100%) rename glQiwiApi/{core => }/event_fetching/webhooks/__init__.py (100%) rename glQiwiApi/{core => }/event_fetching/webhooks/app.py (71%) rename glQiwiApi/{core => }/event_fetching/webhooks/config.py (100%) rename glQiwiApi/{core => }/event_fetching/webhooks/dto/__init__.py (100%) rename glQiwiApi/{core => }/event_fetching/webhooks/dto/errors.py (100%) rename glQiwiApi/{core => }/event_fetching/webhooks/middlewares/__init__.py (100%) rename glQiwiApi/{core => }/event_fetching/webhooks/middlewares/ip.py (83%) rename glQiwiApi/{core => }/event_fetching/webhooks/services/__init__.py (100%) rename glQiwiApi/{core => }/event_fetching/webhooks/services/collision_detector.py (100%) rename glQiwiApi/{core => }/event_fetching/webhooks/services/security/__init__.py (100%) rename glQiwiApi/{core => }/event_fetching/webhooks/services/security/ip.py (100%) rename glQiwiApi/{core => }/event_fetching/webhooks/utils.py (96%) rename glQiwiApi/{core => }/event_fetching/webhooks/views/__init__.py (100%) rename glQiwiApi/{core => }/event_fetching/webhooks/views/base.py (91%) rename glQiwiApi/{core => }/event_fetching/webhooks/views/bill_view.py (93%) rename glQiwiApi/{core => }/event_fetching/webhooks/views/transaction_view.py (87%) delete mode 100644 playground.py diff --git a/.gitignore b/.gitignore index a23385f5..86aecd09 100644 --- a/.gitignore +++ b/.gitignore @@ -145,3 +145,4 @@ docker_test/* docker_test .ruff_cache/* +playground.py diff --git a/glQiwiApi/core/__init__.py b/glQiwiApi/core/__init__.py index 78046452..e69de29b 100644 --- a/glQiwiApi/core/__init__.py +++ b/glQiwiApi/core/__init__.py @@ -1,37 +0,0 @@ -from glQiwiApi.utils.synchronous import async_as_sync, execute_async_as_sync - -from .abc.base_api_client import BaseAPIClient -from .event_fetching.class_based import ( - AbstractBillHandler, - AbstractTransactionHandler, - AbstractTransactionWebhookHandler, - ErrorHandler, - Handler, -) -from .event_fetching.filters import BaseFilter, LambdaBasedFilter -from .event_fetching.webhooks import ( - BaseWebhookView, - QiwiBillWebhookView, - QiwiTransactionWebhookView, - app, -) -from .request_service import RequestService - -__all__ = ( - 'RequestService', - 'BaseFilter', - 'LambdaBasedFilter', - # class-based handlers - 'Handler', - 'AbstractBillHandler', - 'AbstractTransactionHandler', - 'AbstractTransactionWebhookHandler', - 'ErrorHandler', - # synchronous adapters and utils - 'async_as_sync', - 'execute_async_as_sync', - # webhooks - 'QiwiBillWebhookView', - 'QiwiTransactionWebhookView', - 'BaseWebhookView', -) diff --git a/glQiwiApi/core/event_fetching/__init__.py b/glQiwiApi/event_fetching/__init__.py similarity index 100% rename from glQiwiApi/core/event_fetching/__init__.py rename to glQiwiApi/event_fetching/__init__.py diff --git a/glQiwiApi/core/event_fetching/class_based/__init__.py b/glQiwiApi/event_fetching/class_based/__init__.py similarity index 100% rename from glQiwiApi/core/event_fetching/class_based/__init__.py rename to glQiwiApi/event_fetching/class_based/__init__.py diff --git a/glQiwiApi/core/event_fetching/class_based/base.py b/glQiwiApi/event_fetching/class_based/base.py similarity index 100% rename from glQiwiApi/core/event_fetching/class_based/base.py rename to glQiwiApi/event_fetching/class_based/base.py diff --git a/glQiwiApi/core/event_fetching/class_based/bill.py b/glQiwiApi/event_fetching/class_based/bill.py similarity index 100% rename from glQiwiApi/core/event_fetching/class_based/bill.py rename to glQiwiApi/event_fetching/class_based/bill.py diff --git a/glQiwiApi/core/event_fetching/class_based/error.py b/glQiwiApi/event_fetching/class_based/error.py similarity index 100% rename from glQiwiApi/core/event_fetching/class_based/error.py rename to glQiwiApi/event_fetching/class_based/error.py diff --git a/glQiwiApi/core/event_fetching/class_based/transaction.py b/glQiwiApi/event_fetching/class_based/transaction.py similarity index 100% rename from glQiwiApi/core/event_fetching/class_based/transaction.py rename to glQiwiApi/event_fetching/class_based/transaction.py diff --git a/glQiwiApi/core/event_fetching/class_based/webhook_transaction.py b/glQiwiApi/event_fetching/class_based/webhook_transaction.py similarity index 100% rename from glQiwiApi/core/event_fetching/class_based/webhook_transaction.py rename to glQiwiApi/event_fetching/class_based/webhook_transaction.py diff --git a/glQiwiApi/core/event_fetching/dispatcher.py b/glQiwiApi/event_fetching/dispatcher.py similarity index 95% rename from glQiwiApi/core/event_fetching/dispatcher.py rename to glQiwiApi/event_fetching/dispatcher.py index 2db1b45e..f03065c3 100644 --- a/glQiwiApi/core/event_fetching/dispatcher.py +++ b/glQiwiApi/event_fetching/dispatcher.py @@ -20,11 +20,11 @@ cast, ) +from glQiwiApi.event_fetching.class_based.base import Handler from glQiwiApi.qiwi.clients.p2p.types import BillWebhook +from glQiwiApi.qiwi.clients.wallet.types.transaction import Transaction +from glQiwiApi.qiwi.clients.wallet.types.webhooks import TransactionWebhook -from ...qiwi.clients.wallet.types.transaction import Transaction -from ...qiwi.clients.wallet.types.webhooks import TransactionWebhook -from .. import Handler from .filters import BaseFilter, LambdaBasedFilter logger = logging.getLogger('glQiwiApi.dispatcher') diff --git a/glQiwiApi/core/event_fetching/executor.py b/glQiwiApi/event_fetching/executor.py similarity index 98% rename from glQiwiApi/core/event_fetching/executor.py rename to glQiwiApi/event_fetching/executor.py index 70264203..4ba0b594 100644 --- a/glQiwiApi/core/event_fetching/executor.py +++ b/glQiwiApi/event_fetching/executor.py @@ -20,9 +20,9 @@ from aiohttp.web import _run_app # noqa from glQiwiApi import QiwiWrapper -from glQiwiApi.core.event_fetching.dispatcher import BaseDispatcher -from glQiwiApi.core.event_fetching.webhooks.app import configure_app -from glQiwiApi.core.event_fetching.webhooks.config import WebhookConfig +from glQiwiApi.event_fetching.dispatcher import BaseDispatcher +from glQiwiApi.event_fetching.webhooks.app import configure_app +from glQiwiApi.event_fetching.webhooks.config import WebhookConfig from glQiwiApi.ext.webhook_url import WebhookURL from glQiwiApi.qiwi.clients.wallet.client import QiwiWallet from glQiwiApi.qiwi.clients.wallet.methods.history import MAX_HISTORY_LIMIT diff --git a/glQiwiApi/core/event_fetching/filters.py b/glQiwiApi/event_fetching/filters.py similarity index 100% rename from glQiwiApi/core/event_fetching/filters.py rename to glQiwiApi/event_fetching/filters.py diff --git a/glQiwiApi/core/event_fetching/webhooks/__init__.py b/glQiwiApi/event_fetching/webhooks/__init__.py similarity index 100% rename from glQiwiApi/core/event_fetching/webhooks/__init__.py rename to glQiwiApi/event_fetching/webhooks/__init__.py diff --git a/glQiwiApi/core/event_fetching/webhooks/app.py b/glQiwiApi/event_fetching/webhooks/app.py similarity index 71% rename from glQiwiApi/core/event_fetching/webhooks/app.py rename to glQiwiApi/event_fetching/webhooks/app.py index f9427ad9..cbf0ab82 100644 --- a/glQiwiApi/core/event_fetching/webhooks/app.py +++ b/glQiwiApi/event_fetching/webhooks/app.py @@ -2,18 +2,16 @@ from aiohttp import web -from glQiwiApi.core.event_fetching.dispatcher import BaseDispatcher -from glQiwiApi.core.event_fetching.webhooks.config import WebhookConfig -from glQiwiApi.core.event_fetching.webhooks.middlewares.ip import ip_filter_middleware -from glQiwiApi.core.event_fetching.webhooks.services.collision_detector import ( +from glQiwiApi.event_fetching.dispatcher import BaseDispatcher +from glQiwiApi.event_fetching.webhooks.config import WebhookConfig +from glQiwiApi.event_fetching.webhooks.middlewares.ip import ip_filter_middleware +from glQiwiApi.event_fetching.webhooks.services.collision_detector import ( HashBasedCollisionDetector, ) -from glQiwiApi.core.event_fetching.webhooks.services.security.ip import IPFilter -from glQiwiApi.core.event_fetching.webhooks.utils import inject_dependencies -from glQiwiApi.core.event_fetching.webhooks.views.bill_view import QiwiBillWebhookView -from glQiwiApi.core.event_fetching.webhooks.views.transaction_view import ( - QiwiTransactionWebhookView, -) +from glQiwiApi.event_fetching.webhooks.services.security.ip import IPFilter +from glQiwiApi.event_fetching.webhooks.utils import inject_dependencies +from glQiwiApi.event_fetching.webhooks.views.bill_view import QiwiBillWebhookView +from glQiwiApi.event_fetching.webhooks.views.transaction_view import QiwiTransactionWebhookView from glQiwiApi.qiwi.clients.p2p.types import BillWebhook from glQiwiApi.qiwi.clients.wallet.types.webhooks import TransactionWebhook diff --git a/glQiwiApi/core/event_fetching/webhooks/config.py b/glQiwiApi/event_fetching/webhooks/config.py similarity index 100% rename from glQiwiApi/core/event_fetching/webhooks/config.py rename to glQiwiApi/event_fetching/webhooks/config.py diff --git a/glQiwiApi/core/event_fetching/webhooks/dto/__init__.py b/glQiwiApi/event_fetching/webhooks/dto/__init__.py similarity index 100% rename from glQiwiApi/core/event_fetching/webhooks/dto/__init__.py rename to glQiwiApi/event_fetching/webhooks/dto/__init__.py diff --git a/glQiwiApi/core/event_fetching/webhooks/dto/errors.py b/glQiwiApi/event_fetching/webhooks/dto/errors.py similarity index 100% rename from glQiwiApi/core/event_fetching/webhooks/dto/errors.py rename to glQiwiApi/event_fetching/webhooks/dto/errors.py diff --git a/glQiwiApi/core/event_fetching/webhooks/middlewares/__init__.py b/glQiwiApi/event_fetching/webhooks/middlewares/__init__.py similarity index 100% rename from glQiwiApi/core/event_fetching/webhooks/middlewares/__init__.py rename to glQiwiApi/event_fetching/webhooks/middlewares/__init__.py diff --git a/glQiwiApi/core/event_fetching/webhooks/middlewares/ip.py b/glQiwiApi/event_fetching/webhooks/middlewares/ip.py similarity index 83% rename from glQiwiApi/core/event_fetching/webhooks/middlewares/ip.py rename to glQiwiApi/event_fetching/webhooks/middlewares/ip.py index 5a9c527f..18ce9939 100644 --- a/glQiwiApi/core/event_fetching/webhooks/middlewares/ip.py +++ b/glQiwiApi/event_fetching/webhooks/middlewares/ip.py @@ -5,8 +5,8 @@ from aiohttp.typedefs import Handler from aiohttp.web_middlewares import middleware -from glQiwiApi.core.event_fetching.webhooks.services.security.ip import IPFilter -from glQiwiApi.core.event_fetching.webhooks.utils import check_ip +from glQiwiApi.event_fetching.webhooks.services.security.ip import IPFilter +from glQiwiApi.event_fetching.webhooks.utils import check_ip logger = logging.getLogger('glQiwiApi.webhooks.middlewares') diff --git a/glQiwiApi/core/event_fetching/webhooks/services/__init__.py b/glQiwiApi/event_fetching/webhooks/services/__init__.py similarity index 100% rename from glQiwiApi/core/event_fetching/webhooks/services/__init__.py rename to glQiwiApi/event_fetching/webhooks/services/__init__.py diff --git a/glQiwiApi/core/event_fetching/webhooks/services/collision_detector.py b/glQiwiApi/event_fetching/webhooks/services/collision_detector.py similarity index 100% rename from glQiwiApi/core/event_fetching/webhooks/services/collision_detector.py rename to glQiwiApi/event_fetching/webhooks/services/collision_detector.py diff --git a/glQiwiApi/core/event_fetching/webhooks/services/security/__init__.py b/glQiwiApi/event_fetching/webhooks/services/security/__init__.py similarity index 100% rename from glQiwiApi/core/event_fetching/webhooks/services/security/__init__.py rename to glQiwiApi/event_fetching/webhooks/services/security/__init__.py diff --git a/glQiwiApi/core/event_fetching/webhooks/services/security/ip.py b/glQiwiApi/event_fetching/webhooks/services/security/ip.py similarity index 100% rename from glQiwiApi/core/event_fetching/webhooks/services/security/ip.py rename to glQiwiApi/event_fetching/webhooks/services/security/ip.py diff --git a/glQiwiApi/core/event_fetching/webhooks/utils.py b/glQiwiApi/event_fetching/webhooks/utils.py similarity index 96% rename from glQiwiApi/core/event_fetching/webhooks/utils.py rename to glQiwiApi/event_fetching/webhooks/utils.py index 1a672aca..f9886ff7 100644 --- a/glQiwiApi/core/event_fetching/webhooks/utils.py +++ b/glQiwiApi/event_fetching/webhooks/utils.py @@ -8,7 +8,7 @@ from aiohttp.abc import AbstractView from aiohttp.web_request import Request -from glQiwiApi.core.event_fetching.webhooks.services.security.ip import IPFilter +from glQiwiApi.event_fetching.webhooks.services.security.ip import IPFilter def check_ip(ip_filter: IPFilter, request: web.Request) -> Tuple[str, bool]: diff --git a/glQiwiApi/core/event_fetching/webhooks/views/__init__.py b/glQiwiApi/event_fetching/webhooks/views/__init__.py similarity index 100% rename from glQiwiApi/core/event_fetching/webhooks/views/__init__.py rename to glQiwiApi/event_fetching/webhooks/views/__init__.py diff --git a/glQiwiApi/core/event_fetching/webhooks/views/base.py b/glQiwiApi/event_fetching/webhooks/views/base.py similarity index 91% rename from glQiwiApi/core/event_fetching/webhooks/views/base.py rename to glQiwiApi/event_fetching/webhooks/views/base.py index fd9c01d0..0ca25031 100644 --- a/glQiwiApi/core/event_fetching/webhooks/views/base.py +++ b/glQiwiApi/event_fetching/webhooks/views/base.py @@ -6,9 +6,9 @@ from aiohttp import web from aiohttp.web_request import Request -from glQiwiApi.core.event_fetching.dispatcher import BaseDispatcher -from glQiwiApi.core.event_fetching.webhooks.dto.errors import WebhookAPIError -from glQiwiApi.core.event_fetching.webhooks.services.collision_detector import ( +from glQiwiApi.event_fetching.dispatcher import BaseDispatcher +from glQiwiApi.event_fetching.webhooks.dto import WebhookAPIError +from glQiwiApi.event_fetching.webhooks.services.collision_detector import ( AbstractCollisionDetector, UnexpectedCollision, ) diff --git a/glQiwiApi/core/event_fetching/webhooks/views/bill_view.py b/glQiwiApi/event_fetching/webhooks/views/bill_view.py similarity index 93% rename from glQiwiApi/core/event_fetching/webhooks/views/bill_view.py rename to glQiwiApi/event_fetching/webhooks/views/bill_view.py index d1b131cb..211c7639 100644 --- a/glQiwiApi/core/event_fetching/webhooks/views/bill_view.py +++ b/glQiwiApi/event_fetching/webhooks/views/bill_view.py @@ -3,7 +3,7 @@ from aiohttp import web -from glQiwiApi.core.event_fetching.webhooks.views.base import BaseWebhookView +from glQiwiApi.event_fetching.webhooks.views.base import BaseWebhookView from glQiwiApi.qiwi.clients.p2p.types import BillWebhook from glQiwiApi.types.exceptions import WebhookSignatureUnverifiedError diff --git a/glQiwiApi/core/event_fetching/webhooks/views/transaction_view.py b/glQiwiApi/event_fetching/webhooks/views/transaction_view.py similarity index 87% rename from glQiwiApi/core/event_fetching/webhooks/views/transaction_view.py rename to glQiwiApi/event_fetching/webhooks/views/transaction_view.py index 3425fd3c..fe5ba5fc 100644 --- a/glQiwiApi/core/event_fetching/webhooks/views/transaction_view.py +++ b/glQiwiApi/event_fetching/webhooks/views/transaction_view.py @@ -2,8 +2,8 @@ from aiohttp import web -from glQiwiApi.core.event_fetching.webhooks.dto.errors import WebhookAPIError -from glQiwiApi.core.event_fetching.webhooks.views.base import BaseWebhookView +from glQiwiApi.event_fetching.webhooks.dto import WebhookAPIError +from glQiwiApi.event_fetching.webhooks.views.base import BaseWebhookView from glQiwiApi.qiwi.clients.wallet.types.webhooks import TransactionWebhook from glQiwiApi.types.exceptions import WebhookSignatureUnverifiedError diff --git a/playground.py b/playground.py deleted file mode 100644 index 0d4940db..00000000 --- a/playground.py +++ /dev/null @@ -1,10 +0,0 @@ -import asyncio - -from glQiwiApi import QiwiWallet - - -async def main(): - async with QiwiWallet(api_access_token="",phone_number="+380985272064") as w: - print(await w.get_balance()) - -asyncio.run(main()) diff --git a/tests/unit/test_event_fetching/test_webhook/test_app.py b/tests/unit/test_event_fetching/test_webhook/test_app.py index f6dbdc9d..99cddb0c 100644 --- a/tests/unit/test_event_fetching/test_webhook/test_app.py +++ b/tests/unit/test_event_fetching/test_webhook/test_app.py @@ -4,11 +4,11 @@ from aiohttp.web_app import Application from aiohttp.web_request import Request -from glQiwiApi.core.event_fetching.dispatcher import QiwiDispatcher -from glQiwiApi.core.event_fetching.webhooks.app import configure_app -from glQiwiApi.core.event_fetching.webhooks.config import EncryptionConfig, WebhookConfig -from glQiwiApi.core.event_fetching.webhooks.middlewares.ip import ip_filter_middleware -from glQiwiApi.core.event_fetching.webhooks.services.security.ip import IPFilter +from glQiwiApi.event_fetching.dispatcher import QiwiDispatcher +from glQiwiApi.event_fetching.webhooks.app import configure_app +from glQiwiApi.event_fetching.webhooks.config import EncryptionConfig, WebhookConfig +from glQiwiApi.event_fetching.webhooks.middlewares.ip import ip_filter_middleware +from glQiwiApi.event_fetching.webhooks.services.security.ip import IPFilter from tests.unit.test_event_fetching.mocks import WebhookTestData diff --git a/tests/unit/test_event_fetching/test_webhook/test_services/test_collision_detector.py b/tests/unit/test_event_fetching/test_webhook/test_services/test_collision_detector.py index e09a3b10..debc17b4 100644 --- a/tests/unit/test_event_fetching/test_webhook/test_services/test_collision_detector.py +++ b/tests/unit/test_event_fetching/test_webhook/test_services/test_collision_detector.py @@ -2,7 +2,7 @@ import pytest -from glQiwiApi.core.event_fetching.webhooks.services.collision_detector import ( +from glQiwiApi.event_fetching.webhooks.services.collision_detector import ( HashBasedCollisionDetector, UnexpectedCollision, UnhashableObjectError, diff --git a/tests/unit/test_event_fetching/test_webhook/test_views/test_p2p_view.py b/tests/unit/test_event_fetching/test_webhook/test_views/test_p2p_view.py index 40f2ec46..57d7b933 100644 --- a/tests/unit/test_event_fetching/test_webhook/test_views/test_p2p_view.py +++ b/tests/unit/test_event_fetching/test_webhook/test_views/test_p2p_view.py @@ -7,11 +7,11 @@ from aiohttp.web_app import Application from glQiwiApi.core import QiwiBillWebhookView -from glQiwiApi.core.event_fetching.dispatcher import QiwiDispatcher -from glQiwiApi.core.event_fetching.webhooks.services.collision_detector import ( +from glQiwiApi.event_fetching.dispatcher import QiwiDispatcher +from glQiwiApi.event_fetching.webhooks.services.collision_detector import ( HashBasedCollisionDetector, ) -from glQiwiApi.core.event_fetching.webhooks.utils import inject_dependencies +from glQiwiApi.event_fetching.webhooks.utils import inject_dependencies from glQiwiApi.qiwi.clients.p2p.types import BillWebhook from tests.unit.test_event_fetching.mocks import WebhookTestData diff --git a/tests/unit/test_event_fetching/test_webhook/test_views/test_txn_view.py b/tests/unit/test_event_fetching/test_webhook/test_views/test_txn_view.py index 4d8280ee..619369bc 100644 --- a/tests/unit/test_event_fetching/test_webhook/test_views/test_txn_view.py +++ b/tests/unit/test_event_fetching/test_webhook/test_views/test_txn_view.py @@ -10,11 +10,11 @@ from glQiwiApi.core import QiwiTransactionWebhookView from glQiwiApi.core.event_fetching.dispatcher import QiwiDispatcher -from glQiwiApi.core.event_fetching.webhooks.dto.errors import WebhookAPIError -from glQiwiApi.core.event_fetching.webhooks.services.collision_detector import ( +from glQiwiApi.core.event_fetching.webhooks.utils import inject_dependencies +from glQiwiApi.event_fetching.webhooks.dto import WebhookAPIError +from glQiwiApi.event_fetching.webhooks.services.collision_detector import ( HashBasedCollisionDetector, ) -from glQiwiApi.core.event_fetching.webhooks.utils import inject_dependencies from glQiwiApi.qiwi.clients.wallet.types import TransactionWebhook from tests.unit.test_event_fetching.mocks import WebhookTestData