Skip to content

Commit

Permalink
🎨 set test scope to module level
Browse files Browse the repository at this point in the history
Signed-off-by: ff137 <ff137@proton.me>
  • Loading branch information
ff137 committed Feb 7, 2024
1 parent 2196afa commit eaae562
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ async def asyncSetUp(self):
did_doc_attach=self.did_doc_attach,
)

@pytest.mark.asyncio
@pytest.mark.asyncio(scope="module")
@mock.patch.object(test_module, "DIDXManager")
async def test_called(self, mock_didx_mgr):
mock_didx_mgr.return_value.accept_response = mock.CoroutineMock()
Expand All @@ -91,7 +91,7 @@ async def test_called(self, mock_didx_mgr):
)
assert not responder.messages

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

@pytest.mark.asyncio
@pytest.mark.asyncio(scope="module")
@mock.patch.object(test_module, "DIDXManager")
@mock.patch.object(connection_target, "ConnectionTarget")
async def test_problem_report(self, mock_conn_target, mock_didx_mgr):
Expand Down Expand Up @@ -146,7 +146,7 @@ async def test_problem_report(self, mock_conn_target, mock_didx_mgr):
)
assert target == {"target_list": [mock_conn_target]}

@pytest.mark.asyncio
@pytest.mark.asyncio(scope="module")
@mock.patch.object(test_module, "DIDXManager")
@mock.patch.object(connection_target, "ConnectionTarget")
async def test_problem_report_did_doc(
Expand Down Expand Up @@ -193,7 +193,7 @@ async def test_problem_report_did_doc(
)
assert target == {"target_list": [mock_conn_target]}

@pytest.mark.asyncio
@pytest.mark.asyncio(scope="module")
@mock.patch.object(test_module, "DIDXManager")
@mock.patch.object(connection_target, "ConnectionTarget")
async def test_problem_report_did_doc_no_conn_target(
Expand Down

0 comments on commit eaae562

Please sign in to comment.