Skip to content

Commit eaae562

Browse files
committed
🎨 set test scope to module level
Signed-off-by: ff137 <[email protected]>
1 parent 2196afa commit eaae562

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

aries_cloudagent/protocols/didexchange/v1_0/handlers/tests/test_response_handler.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ async def asyncSetUp(self):
7777
did_doc_attach=self.did_doc_attach,
7878
)
7979

80-
@pytest.mark.asyncio
80+
@pytest.mark.asyncio(scope="module")
8181
@mock.patch.object(test_module, "DIDXManager")
8282
async def test_called(self, mock_didx_mgr):
8383
mock_didx_mgr.return_value.accept_response = mock.CoroutineMock()
@@ -91,7 +91,7 @@ async def test_called(self, mock_didx_mgr):
9191
)
9292
assert not responder.messages
9393

94-
@pytest.mark.asyncio
94+
@pytest.mark.asyncio(scope="module")
9595
@mock.patch.object(test_module, "DIDXManager")
9696
async def test_called_auto_ping(self, mock_didx_mgr):
9797
self.ctx.update_settings({"auto_ping_connection": True})
@@ -109,7 +109,7 @@ async def test_called_auto_ping(self, mock_didx_mgr):
109109
result, target = messages[0]
110110
assert isinstance(result, Ping)
111111

112-
@pytest.mark.asyncio
112+
@pytest.mark.asyncio(scope="module")
113113
@mock.patch.object(test_module, "DIDXManager")
114114
@mock.patch.object(connection_target, "ConnectionTarget")
115115
async def test_problem_report(self, mock_conn_target, mock_didx_mgr):
@@ -146,7 +146,7 @@ async def test_problem_report(self, mock_conn_target, mock_didx_mgr):
146146
)
147147
assert target == {"target_list": [mock_conn_target]}
148148

149-
@pytest.mark.asyncio
149+
@pytest.mark.asyncio(scope="module")
150150
@mock.patch.object(test_module, "DIDXManager")
151151
@mock.patch.object(connection_target, "ConnectionTarget")
152152
async def test_problem_report_did_doc(
@@ -193,7 +193,7 @@ async def test_problem_report_did_doc(
193193
)
194194
assert target == {"target_list": [mock_conn_target]}
195195

196-
@pytest.mark.asyncio
196+
@pytest.mark.asyncio(scope="module")
197197
@mock.patch.object(test_module, "DIDXManager")
198198
@mock.patch.object(connection_target, "ConnectionTarget")
199199
async def test_problem_report_did_doc_no_conn_target(

0 commit comments

Comments
 (0)