From 5a7ce694f222116d87d447f9a28422af795613b4 Mon Sep 17 00:00:00 2001 From: ff137 Date: Thu, 9 May 2024 13:11:00 +0300 Subject: [PATCH] :art: rename `setUp` method to `asyncSetUp` Signed-off-by: ff137 --- basicmessage_storage/basicmessage_storage/v1_0/__init__.py | 2 +- .../basicmessage_storage/v1_0/tests/test_init.py | 2 +- .../basicmessage_storage/v1_0/tests/test_models.py | 2 +- .../basicmessage_storage/v1_0/tests/test_routes.py | 2 +- connection_update/connection_update/v1_0/__init__.py | 2 +- connection_update/connection_update/v1_0/tests/test_init.py | 2 +- connection_update/connection_update/v1_0/tests/test_routes.py | 2 +- .../firebase_push_notifications/v1_0/tests/test_manager.py | 2 +- .../firebase_push_notifications/v1_0/tests/test_routes.py | 2 +- kafka_events/kafka_events/v1_0/kafka_queue/events/__init__.py | 2 +- multitenant_provider/multitenant_provider/v1_0/__init__.py | 2 +- .../multitenant_provider/v1_0/tests/test_init.py | 2 +- .../multitenant_provider/v1_0/tests/test_manager.py | 2 +- .../multitenant_provider/v1_0/tests/test_models.py | 2 +- .../multitenant_provider/v1_0/tests/test_provider.py | 2 +- .../multitenant_provider/v1_0/tests/test_routes.py | 2 +- oid4vci/oid4vci/__init__.py | 2 +- oid4vci/oid4vci/jwk_resolver.py | 2 +- oid4vci/oid4vci/oid4vci_server.py | 2 +- redis_events/redis_events/v1_0/redis_queue/events/__init__.py | 2 +- redis_events/redis_events/v1_0/redis_queue/tests/test_events.py | 2 +- .../redis_events/v1_0/redis_queue/tests/test_inbound.py | 2 +- .../redis_events/v1_0/redis_queue/tests/test_outbound.py | 2 +- rpc/rpc/v1_0/tests/test_routes.py | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/basicmessage_storage/basicmessage_storage/v1_0/__init__.py b/basicmessage_storage/basicmessage_storage/v1_0/__init__.py index 0700a1ce2..f1bb4c551 100644 --- a/basicmessage_storage/basicmessage_storage/v1_0/__init__.py +++ b/basicmessage_storage/basicmessage_storage/v1_0/__init__.py @@ -17,7 +17,7 @@ BASIC_MESSAGE_EVENT_PATTERN = re.compile("^acapy::basicmessage::received$") -async def setup(context: InjectionContext): +async def asyncSetUp(context: InjectionContext): """Setup the plugin.""" LOGGER.info("< basicmessage_storage plugin setup...") protocol_registry = context.inject(ProtocolRegistry) diff --git a/basicmessage_storage/basicmessage_storage/v1_0/tests/test_init.py b/basicmessage_storage/basicmessage_storage/v1_0/tests/test_init.py index c59949bd1..e6c80f07d 100644 --- a/basicmessage_storage/basicmessage_storage/v1_0/tests/test_init.py +++ b/basicmessage_storage/basicmessage_storage/v1_0/tests/test_init.py @@ -16,7 +16,7 @@ class MockConfig(BaseModel): class TestInit(IsolatedAsyncioTestCase): - async def setUp(self) -> None: + async def asyncSetUp(self) -> None: self.session_inject = {} self.context = MagicMock() self.profile = InMemoryProfile.test_profile() diff --git a/basicmessage_storage/basicmessage_storage/v1_0/tests/test_models.py b/basicmessage_storage/basicmessage_storage/v1_0/tests/test_models.py index 1164504f3..a2e0fb623 100644 --- a/basicmessage_storage/basicmessage_storage/v1_0/tests/test_models.py +++ b/basicmessage_storage/basicmessage_storage/v1_0/tests/test_models.py @@ -9,7 +9,7 @@ class TestBasicMessageRecord(IsolatedAsyncioTestCase): - async def setUp(self) -> None: + async def asyncSetUp(self) -> None: self.session = InMemoryProfile.test_session() async def test_init_creates_record_with_default_parameters(self): diff --git a/basicmessage_storage/basicmessage_storage/v1_0/tests/test_routes.py b/basicmessage_storage/basicmessage_storage/v1_0/tests/test_routes.py index 32e5b8488..9ee435166 100644 --- a/basicmessage_storage/basicmessage_storage/v1_0/tests/test_routes.py +++ b/basicmessage_storage/basicmessage_storage/v1_0/tests/test_routes.py @@ -13,7 +13,7 @@ class TestRoutes(IsolatedAsyncioTestCase): - async def setUp(self) -> None: + async def asyncSetUp(self) -> None: self.session_inject = {} self.context = AdminRequestContext.test_context(self.session_inject) self.request_dict = { diff --git a/connection_update/connection_update/v1_0/__init__.py b/connection_update/connection_update/v1_0/__init__.py index 78145756f..a6258d114 100644 --- a/connection_update/connection_update/v1_0/__init__.py +++ b/connection_update/connection_update/v1_0/__init__.py @@ -8,7 +8,7 @@ LOGGER = logging.getLogger(__name__) -async def setup(context: InjectionContext): +async def asyncSetUp(context: InjectionContext): """Setup script for connection_update.""" LOGGER.info("> plugin setup...") diff --git a/connection_update/connection_update/v1_0/tests/test_init.py b/connection_update/connection_update/v1_0/tests/test_init.py index 17af4200f..35770db9b 100644 --- a/connection_update/connection_update/v1_0/tests/test_init.py +++ b/connection_update/connection_update/v1_0/tests/test_init.py @@ -10,7 +10,7 @@ class TestInit(IsolatedAsyncioTestCase): - async def setUp(self) -> None: + async def asyncSetUp(self) -> None: self.session_inject = {} self.context = MagicMock() self.profile = InMemoryProfile.test_profile() diff --git a/connection_update/connection_update/v1_0/tests/test_routes.py b/connection_update/connection_update/v1_0/tests/test_routes.py index 6c694e02e..f9ca9e53d 100644 --- a/connection_update/connection_update/v1_0/tests/test_routes.py +++ b/connection_update/connection_update/v1_0/tests/test_routes.py @@ -8,7 +8,7 @@ class TestRoutes(IsolatedAsyncioTestCase): - async def setUp(self) -> None: + async def asyncSetUp(self) -> None: self.session_inject = {} self.context = AdminRequestContext.test_context(self.session_inject) self.request_dict = { diff --git a/firebase_push_notifications/firebase_push_notifications/v1_0/tests/test_manager.py b/firebase_push_notifications/firebase_push_notifications/v1_0/tests/test_manager.py index 1bcc91cdf..9c28be0ed 100644 --- a/firebase_push_notifications/firebase_push_notifications/v1_0/tests/test_manager.py +++ b/firebase_push_notifications/firebase_push_notifications/v1_0/tests/test_manager.py @@ -37,7 +37,7 @@ def mock_logger(): class TestManager(IsolatedAsyncioTestCase): - async def setUp(self): + async def asyncSetUp(self): self.profile = InMemoryProfile.test_profile() self.context = self.profile.context self.test_conn_id = "connection-id" diff --git a/firebase_push_notifications/firebase_push_notifications/v1_0/tests/test_routes.py b/firebase_push_notifications/firebase_push_notifications/v1_0/tests/test_routes.py index b9445ef94..9b585db90 100644 --- a/firebase_push_notifications/firebase_push_notifications/v1_0/tests/test_routes.py +++ b/firebase_push_notifications/firebase_push_notifications/v1_0/tests/test_routes.py @@ -11,7 +11,7 @@ class TestRoutes(IsolatedAsyncioTestCase): - async def setUp(self) -> None: + async def asyncSetUp(self) -> None: self.session_inject = {} self.context = AdminRequestContext.test_context(self.session_inject) self.request_dict = {"context": self.context} diff --git a/kafka_events/kafka_events/v1_0/kafka_queue/events/__init__.py b/kafka_events/kafka_events/v1_0/kafka_queue/events/__init__.py index e8d329d54..f6be1caa3 100644 --- a/kafka_events/kafka_events/v1_0/kafka_queue/events/__init__.py +++ b/kafka_events/kafka_events/v1_0/kafka_queue/events/__init__.py @@ -18,7 +18,7 @@ LOGGER = logging.getLogger(__name__) -async def setup(context: InjectionContext): +async def asyncSetUp(context: InjectionContext): """Setup the plugin.""" config = get_config(context.settings).events if not config: diff --git a/multitenant_provider/multitenant_provider/v1_0/__init__.py b/multitenant_provider/multitenant_provider/v1_0/__init__.py index 28753f052..c645b12b3 100644 --- a/multitenant_provider/multitenant_provider/v1_0/__init__.py +++ b/multitenant_provider/multitenant_provider/v1_0/__init__.py @@ -14,7 +14,7 @@ LOGGER = logging.getLogger(__name__) -async def setup(context: InjectionContext): +async def asyncSetUp(context: InjectionContext): """Setup the plugin.""" LOGGER.info("> plugin setup...") protocol_registry = context.inject(ProtocolRegistry) diff --git a/multitenant_provider/multitenant_provider/v1_0/tests/test_init.py b/multitenant_provider/multitenant_provider/v1_0/tests/test_init.py index a8b703185..ed794601b 100644 --- a/multitenant_provider/multitenant_provider/v1_0/tests/test_init.py +++ b/multitenant_provider/multitenant_provider/v1_0/tests/test_init.py @@ -10,7 +10,7 @@ class TestInit(IsolatedAsyncioTestCase): - async def setUp(self) -> None: + async def asyncSetUp(self) -> None: self.session_inject = {} self.context = MagicMock() self.profile = InMemoryProfile.test_profile() diff --git a/multitenant_provider/multitenant_provider/v1_0/tests/test_manager.py b/multitenant_provider/multitenant_provider/v1_0/tests/test_manager.py index 7894fa180..2c1a38b2b 100644 --- a/multitenant_provider/multitenant_provider/v1_0/tests/test_manager.py +++ b/multitenant_provider/multitenant_provider/v1_0/tests/test_manager.py @@ -48,7 +48,7 @@ def __init__(self, requires_key: bool) -> None: class TestMulittokenHandler(IsolatedAsyncioTestCase): - async def setUp(self) -> None: + async def asyncSetUp(self) -> None: self.session_inject = {} self.manager = MagicMock() self.get_profile = lambda: InMemoryProfile.test_profile() diff --git a/multitenant_provider/multitenant_provider/v1_0/tests/test_models.py b/multitenant_provider/multitenant_provider/v1_0/tests/test_models.py index 712b7f298..0de1a9b48 100644 --- a/multitenant_provider/multitenant_provider/v1_0/tests/test_models.py +++ b/multitenant_provider/multitenant_provider/v1_0/tests/test_models.py @@ -8,7 +8,7 @@ class TestModels(IsolatedAsyncioTestCase): - def setUp(self) -> None: + async def asyncSetUp(self) -> None: self.profile = InMemoryProfile.test_profile() @patch.object( diff --git a/multitenant_provider/multitenant_provider/v1_0/tests/test_provider.py b/multitenant_provider/multitenant_provider/v1_0/tests/test_provider.py index fb251ea5a..c79d11b91 100644 --- a/multitenant_provider/multitenant_provider/v1_0/tests/test_provider.py +++ b/multitenant_provider/multitenant_provider/v1_0/tests/test_provider.py @@ -11,7 +11,7 @@ class TestProvider(IsolatedAsyncioTestCase): - async def setUp(self) -> None: + async def asyncSetUp(self) -> None: self.profile = InMemoryProfile.test_profile() self.profile.inject = Mock() self.profile.inject.return_value = MultitenantProviderConfig( diff --git a/multitenant_provider/multitenant_provider/v1_0/tests/test_routes.py b/multitenant_provider/multitenant_provider/v1_0/tests/test_routes.py index 55f9cff65..7efbb1eff 100644 --- a/multitenant_provider/multitenant_provider/v1_0/tests/test_routes.py +++ b/multitenant_provider/multitenant_provider/v1_0/tests/test_routes.py @@ -38,7 +38,7 @@ class MockWalletRecordRequiresExternalKey: class TestRoutes(IsolatedAsyncioTestCase): - async def setUp(self) -> None: + async def asyncSetUp(self) -> None: self.session_inject = {} self.profile = InMemoryProfile.test_profile() mock_session = MagicMock() diff --git a/oid4vci/oid4vci/__init__.py b/oid4vci/oid4vci/__init__.py index 30304f32a..51119a640 100644 --- a/oid4vci/oid4vci/__init__.py +++ b/oid4vci/oid4vci/__init__.py @@ -15,7 +15,7 @@ LOGGER = logging.getLogger(__name__) -async def setup(context: InjectionContext): +async def asyncSetUp(context: InjectionContext): """Setup the plugin.""" event_bus = context.inject(EventBus) event_bus.subscribe(STARTUP_EVENT_PATTERN, startup) diff --git a/oid4vci/oid4vci/jwk_resolver.py b/oid4vci/oid4vci/jwk_resolver.py index 86e998a1f..f328c0f3d 100644 --- a/oid4vci/oid4vci/jwk_resolver.py +++ b/oid4vci/oid4vci/jwk_resolver.py @@ -19,7 +19,7 @@ def __init__(self): """Initialize the resolver.""" super().__init__(ResolverType.NATIVE) - async def setup(self, context: InjectionContext): + async def asyncSetUp(self, context: InjectionContext): """Perform required setup for the resolver.""" pass diff --git a/oid4vci/oid4vci/oid4vci_server.py b/oid4vci/oid4vci/oid4vci_server.py index a8e62c029..aae7a8507 100644 --- a/oid4vci/oid4vci/oid4vci_server.py +++ b/oid4vci/oid4vci/oid4vci_server.py @@ -57,7 +57,7 @@ async def make_application(self) -> web.Application: middlewares = [ready_middleware, debug_middleware, validation_middleware] @web.middleware - async def setup_context(request: web.Request, handler): + async def asyncSetUp_context(request: web.Request, handler): """Set up request context. TODO: support Multitenancy context setup diff --git a/redis_events/redis_events/v1_0/redis_queue/events/__init__.py b/redis_events/redis_events/v1_0/redis_queue/events/__init__.py index 10cf2892a..6e9a41f67 100755 --- a/redis_events/redis_events/v1_0/redis_queue/events/__init__.py +++ b/redis_events/redis_events/v1_0/redis_queue/events/__init__.py @@ -20,7 +20,7 @@ LOGGER = logging.getLogger(__name__) -async def setup(context: InjectionContext): +async def asyncSetUp(context: InjectionContext): """Setup the plugin.""" LOGGER.info("> plugin setup...") config = get_config(context.settings).event or EventConfig.default() diff --git a/redis_events/redis_events/v1_0/redis_queue/tests/test_events.py b/redis_events/redis_events/v1_0/redis_queue/tests/test_events.py index 9a615a8fd..4fc428f21 100755 --- a/redis_events/redis_events/v1_0/redis_queue/tests/test_events.py +++ b/redis_events/redis_events/v1_0/redis_queue/tests/test_events.py @@ -71,7 +71,7 @@ class TestRedisEvents(IsolatedAsyncioTestCase): - def setUp(self): + async def asyncSetUp(self): self.port = unused_port() self.session = None self.profile = InMemoryProfile.test_profile() diff --git a/redis_events/redis_events/v1_0/redis_queue/tests/test_inbound.py b/redis_events/redis_events/v1_0/redis_queue/tests/test_inbound.py index 2aa2bef45..3af6daac4 100755 --- a/redis_events/redis_events/v1_0/redis_queue/tests/test_inbound.py +++ b/redis_events/redis_events/v1_0/redis_queue/tests/test_inbound.py @@ -90,7 +90,7 @@ class TestRedisInbound(IsolatedAsyncioTestCase): - def setUp(self): + async def asyncSetUp(self): self.port = unused_port() self.session = None self.profile = InMemoryProfile.test_profile() diff --git a/redis_events/redis_events/v1_0/redis_queue/tests/test_outbound.py b/redis_events/redis_events/v1_0/redis_queue/tests/test_outbound.py index 0c6fd3b9f..40e6d3cc3 100755 --- a/redis_events/redis_events/v1_0/redis_queue/tests/test_outbound.py +++ b/redis_events/redis_events/v1_0/redis_queue/tests/test_outbound.py @@ -84,7 +84,7 @@ class TestRedisOutbound(IsolatedAsyncioTestCase): - def setUp(self): + async def asyncSetUp(self): self.port = unused_port() self.session = None self.profile = InMemoryProfile.test_profile() diff --git a/rpc/rpc/v1_0/tests/test_routes.py b/rpc/rpc/v1_0/tests/test_routes.py index 87e05d652..cdf5ddba7 100644 --- a/rpc/rpc/v1_0/tests/test_routes.py +++ b/rpc/rpc/v1_0/tests/test_routes.py @@ -39,7 +39,7 @@ def __init__(self, connection_id, is_ready): class TestDRPCRoutes(IsolatedAsyncioTestCase): - def setUp(self): + async def asyncSetUp(self): self.session_inject = {} self.storage = MagicMock()