Skip to content

Commit 42c2df9

Browse files
authored
Merge pull request openwallet-foundation#1994 from ianco/fix/txn-job-setting
Fix/txn job setting
2 parents 4748a2b + e82902a commit 42c2df9

2 files changed

Lines changed: 0 additions & 24 deletions

File tree

aries_cloudagent/protocols/endorse_transaction/v1_0/handlers/tests/test_transaction_job_to_send_handler.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -34,26 +34,6 @@ async def test_called(self):
3434
)
3535
assert not responder.messages
3636

37-
async def test_called_not_ready(self):
38-
request_context = RequestContext.test_context()
39-
request_context.message_receipt = MessageReceipt()
40-
request_context.connection_record = async_mock.MagicMock()
41-
42-
with async_mock.patch.object(
43-
test_module, "TransactionManager", autospec=True
44-
) as mock_tran_mgr:
45-
mock_tran_mgr.return_value.set_transaction_their_job = (
46-
async_mock.CoroutineMock()
47-
)
48-
request_context.message = TransactionJobToSend()
49-
request_context.connection_ready = False
50-
handler = test_module.TransactionJobToSendHandler()
51-
responder = MockResponder()
52-
with self.assertRaises(test_module.HandlerException):
53-
await handler.handle(request_context, responder)
54-
55-
assert not responder.messages
56-
5737
async def test_called_x(self):
5838
request_context = RequestContext.test_context()
5939
request_context.message_receipt = MessageReceipt()

aries_cloudagent/protocols/endorse_transaction/v1_0/handlers/transaction_job_to_send_handler.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from .....messaging.base_handler import (
44
BaseHandler,
55
BaseResponder,
6-
HandlerException,
76
RequestContext,
87
)
98

@@ -26,9 +25,6 @@ async def handle(self, context: RequestContext, responder: BaseResponder):
2625
self._logger.debug(f"TransactionJobToSendHandler called with context {context}")
2726
assert isinstance(context.message, TransactionJobToSend)
2827

29-
if not context.connection_ready:
30-
raise HandlerException("No connection established")
31-
3228
mgr = TransactionManager(context.profile)
3329
try:
3430
await mgr.set_transaction_their_job(

0 commit comments

Comments
 (0)