Skip to content

Commit

Permalink
🎨 rename setUp method to asyncSetUp
Browse files Browse the repository at this point in the history
Signed-off-by: ff137 <[email protected]>
  • Loading branch information
ff137 committed May 9, 2024
1 parent 908a7b1 commit 5a7ce69
Show file tree
Hide file tree
Showing 24 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion basicmessage_storage/basicmessage_storage/v1_0/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion connection_update/connection_update/v1_0/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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...")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion multitenant_provider/multitenant_provider/v1_0/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


class TestModels(IsolatedAsyncioTestCase):
def setUp(self) -> None:
async def asyncSetUp(self) -> None:
self.profile = InMemoryProfile.test_profile()

@patch.object(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion oid4vci/oid4vci/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion oid4vci/oid4vci/jwk_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion oid4vci/oid4vci/oid4vci_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion rpc/rpc/v1_0/tests/test_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 5a7ce69

Please sign in to comment.