Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Clément Humbert <clement.humbert@gmail.com>
  • Loading branch information
chumbert committed Sep 2, 2021
1 parent 815078e commit 76fd6bd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
13 changes: 7 additions & 6 deletions aries_cloudagent/core/conductor.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
from ..config.ledger import get_genesis_transactions, ledger_config
from ..config.logging import LoggingConfigurator
from ..config.wallet import wallet_config
from ..connections.models.conn_record import ConnRecord
from ..core.profile import Profile
from ..ledger.error import LedgerConfigError, LedgerTransactionError
from ..messaging.responder import BaseResponder
Expand All @@ -33,7 +32,7 @@
)
from ..protocols.coordinate_mediation.v1_0.manager import MediationManager
from ..protocols.out_of_band.v1_0.manager import OutOfBandManager
from ..protocols.out_of_band.v1_0.messages.invitation import HSProto, InvitationMessage
from ..protocols.out_of_band.v1_0.messages.invitation import HSProto
from ..transport.inbound.manager import InboundTransportManager
from ..transport.inbound.message import InboundMessage
from ..transport.outbound.base import OutboundDeliveryError
Expand Down Expand Up @@ -311,12 +310,14 @@ async def start(self) -> None:
)

async with self.root_profile.session() as session:
mgr = ConnectionManager(session) if mediation_connections_invite else OutOfBandManager(session)
mgr = (
ConnectionManager(session)
if mediation_connections_invite
else OutOfBandManager(session)
)

conn_record = await mgr.receive_invitation(
invitation=ConnectionInvitation.from_url(
mediation_invitation
),
invitation=ConnectionInvitation.from_url(mediation_invitation),
auto_accept=True,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2115,9 +2115,7 @@ async def test_existing_conn_record_public_did_not_accepted(self):
)
== "not_accepted"
)
assert (
result.connection_id != retrieved_conn_records[0].connection_id
)
assert result.connection_id != retrieved_conn_records[0].connection_id

async def test_existing_conn_record_public_did_inverse_cases(self):
self.session.context.update_settings({"public_invites": True})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ async def test_invitation_create_x(self):

async def test_invitation_receive(self):
self.request.json = async_mock.CoroutineMock()
expected_connection_record = ConnRecord(connection_id='some-id')
expected_connection_record = ConnRecord(connection_id="some-id")

with async_mock.patch.object(
test_module, "OutOfBandManager", autospec=True
Expand All @@ -99,7 +99,9 @@ async def test_invitation_receive(self):
)

await test_module.invitation_receive(self.request)
mock_json_response.assert_called_once_with(expected_connection_record.serialize())
mock_json_response.assert_called_once_with(
expected_connection_record.serialize()
)

async def test_invitation_receive_forbidden_x(self):
self.context.update_settings({"admin.no_receive_invites": True})
Expand Down

0 comments on commit 76fd6bd

Please sign in to comment.