Skip to content

Commit

Permalink
🎨 Rename class to resolve PytestCollectionWarning
Browse files Browse the repository at this point in the history
Signed-off-by: ff137 <[email protected]>
  • Loading branch information
ff137 committed Nov 14, 2024
1 parent 02019c3 commit d8632ee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions acapy_agent/didcomm_v2/tests/test_adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from ..adapters import ResolverAdapter, SecretsAdapter, SecretsAdapterError


class TestDIDResolver(BaseDIDResolver):
class MockDIDResolver(BaseDIDResolver):
async def setup(self, context: InjectionContext):
return await super().setup(context)

Expand All @@ -26,7 +26,7 @@ async def resolve(
self,
profile,
did,
sercive_accept=None,
service_accept=None,
):
return {"did": did, "test": "didDoc"}

Expand All @@ -46,7 +46,7 @@ async def asyncSetUp(self):
self.test_did = "did:test:0"
self.invalid_did = "this shouldn't work"
resolver = DIDResolver()
resolver.register_resolver(TestDIDResolver())
resolver.register_resolver(MockDIDResolver())
self.res_adapter = ResolverAdapter(profile=self.profile, resolver=resolver)

async def test_resolver_adapter_resolve_did(self):
Expand Down
8 changes: 4 additions & 4 deletions acapy_agent/transport/tests/test_pack_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ async def test_get_recipient_keys_fails(self):
serializer.get_recipient_keys(json.dumps(enc_message))


class TestDIDCommMessaging(DIDCommMessaging):
class MockDIDCommMessaging(DIDCommMessaging):
def __init__(
self,
):
Expand Down Expand Up @@ -255,7 +255,7 @@ async def test_errors(self):
message_json = json.dumps(message)
async with self.profile.session() as session:
session.context.injector.bind_instance(
DIDCommMessaging, TestDIDCommMessaging()
DIDCommMessaging, MockDIDCommMessaging()
)
with self.assertRaises(WireFormatParseError) as context:
await wire_format.parse_message(session, message_json)
Expand All @@ -273,7 +273,7 @@ async def test_errors(self):
async def test_fallback(self):
serializer = V2PackWireFormat()

test_dm = TestDIDCommMessaging()
test_dm = MockDIDCommMessaging()
test_dm.packaging.unpack = mock.AsyncMock(side_effect=CryptoServiceError())
async with self.profile.session() as session:
session.context.injector.bind_instance(DIDCommMessaging, test_dm)
Expand All @@ -289,7 +289,7 @@ async def test_fallback(self):
async def test_encode(self):
serializer = V2PackWireFormat()

test_dm = TestDIDCommMessaging()
test_dm = MockDIDCommMessaging()
test_dm.pack = mock.AsyncMock(
return_value=PackResult(
message=self.test_message, target_services=mock.MagicMock()
Expand Down

0 comments on commit d8632ee

Please sign in to comment.