Skip to content

Commit

Permalink
[refactoring]: event_fetching -> core/event_fetching
Browse files Browse the repository at this point in the history
  • Loading branch information
GLEF1X committed Sep 9, 2023
1 parent f30db4c commit 3414f3b
Show file tree
Hide file tree
Showing 30 changed files with 32 additions and 36 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
cast,
)

from glQiwiApi.event_fetching.class_based.base import Handler
from glQiwiApi.core.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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
from aiohttp.web import _run_app # noqa

from glQiwiApi import QiwiWrapper
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.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.ext.webhook_url import WebhookURL
from glQiwiApi.qiwi.clients.wallet.client import QiwiWallet
from glQiwiApi.qiwi.clients.wallet.methods.history import MAX_HISTORY_LIMIT
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@

from aiohttp import web

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 (
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 (
HashBasedCollisionDetector,
)
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.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.qiwi.clients.p2p.types import BillWebhook
from glQiwiApi.qiwi.clients.wallet.types.webhooks import TransactionWebhook

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
from aiohttp.typedefs import Handler
from aiohttp.web_middlewares import middleware

from glQiwiApi.event_fetching.webhooks.services.security.ip import IPFilter
from glQiwiApi.event_fetching.webhooks.utils import check_ip
from glQiwiApi.core.event_fetching.webhooks.services.security.ip import IPFilter
from glQiwiApi.core.event_fetching.webhooks.utils import check_ip

logger = logging.getLogger('glQiwiApi.webhooks.middlewares')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from aiohttp.abc import AbstractView
from aiohttp.web_request import Request

from glQiwiApi.event_fetching.webhooks.services.security.ip import IPFilter
from glQiwiApi.core.event_fetching.webhooks.services.security.ip import IPFilter


def check_ip(ip_filter: IPFilter, request: web.Request) -> Tuple[str, bool]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
from aiohttp import web
from aiohttp.web_request import Request

from glQiwiApi.event_fetching.dispatcher import BaseDispatcher
from glQiwiApi.event_fetching.webhooks.dto import WebhookAPIError
from glQiwiApi.event_fetching.webhooks.services.collision_detector import (
from glQiwiApi.core.event_fetching.dispatcher import BaseDispatcher
from glQiwiApi.core.event_fetching.webhooks.dto import WebhookAPIError
from glQiwiApi.core.event_fetching.webhooks.services.collision_detector import (
AbstractCollisionDetector,
UnexpectedCollision,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from aiohttp import web

from glQiwiApi.event_fetching.webhooks.views.base import BaseWebhookView
from glQiwiApi.core.event_fetching.webhooks.views.base import BaseWebhookView
from glQiwiApi.qiwi.clients.p2p.types import BillWebhook
from glQiwiApi.types.exceptions import WebhookSignatureUnverifiedError

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

from aiohttp import web

from glQiwiApi.event_fetching.webhooks.dto import WebhookAPIError
from glQiwiApi.event_fetching.webhooks.views.base import BaseWebhookView
from glQiwiApi.core.event_fetching.webhooks.dto import WebhookAPIError
from glQiwiApi.core.event_fetching.webhooks.views.base import BaseWebhookView
from glQiwiApi.qiwi.clients.wallet.types.webhooks import TransactionWebhook
from glQiwiApi.types.exceptions import WebhookSignatureUnverifiedError

Expand Down
9 changes: 4 additions & 5 deletions tests/unit/test_event_fetching/test_webhook/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
from aiohttp.web_app import Application
from aiohttp.web_request import Request

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 glQiwiApi.core.event_fetching import IPFilter, 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 tests.unit.test_event_fetching.mocks import WebhookTestData


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest

from glQiwiApi.event_fetching.webhooks.services.collision_detector import (
from glQiwiApi.core.event_fetching import (
HashBasedCollisionDetector,
UnexpectedCollision,
UnhashableObjectError,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@
from aiohttp.web_app import Application

from glQiwiApi.core import QiwiBillWebhookView
from glQiwiApi.event_fetching.dispatcher import QiwiDispatcher
from glQiwiApi.event_fetching.webhooks.services.collision_detector import (
HashBasedCollisionDetector,
)
from glQiwiApi.event_fetching.webhooks.utils import inject_dependencies
from glQiwiApi.core.event_fetching import HashBasedCollisionDetector, QiwiDispatcher
from glQiwiApi.core.event_fetching.webhooks.utils import inject_dependencies
from glQiwiApi.qiwi.clients.p2p.types import BillWebhook
from tests.unit.test_event_fetching.mocks import WebhookTestData

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@
from aiohttp.web_app import Application

from glQiwiApi.core import QiwiTransactionWebhookView
from glQiwiApi.core.event_fetching import HashBasedCollisionDetector
from glQiwiApi.core.event_fetching.dispatcher import QiwiDispatcher
from glQiwiApi.core.event_fetching.webhooks.dto import WebhookAPIError
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.qiwi.clients.wallet.types import TransactionWebhook
from tests.unit.test_event_fetching.mocks import WebhookTestData

Expand Down

0 comments on commit 3414f3b

Please sign in to comment.