Skip to content

Commit 573c208

Browse files
committed
🎨 Replace deprecated scope keyword with loop_scope
Signed-off-by: ff137 <[email protected]>
1 parent 36e47ce commit 573c208

File tree

4 files changed

+21
-21
lines changed

4 files changed

+21
-21
lines changed

acapy_agent/multitenant/admin/tests/test_routes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ async def test_wallets_list_query(self):
143143
}
144144
)
145145

146-
@pytest.mark.asyncio(scope="function")
146+
@pytest.mark.asyncio(loop_scope="function")
147147
async def test_wallet_create_tenant_settings(self):
148148
body = {
149149
"wallet_name": "test",
@@ -796,7 +796,7 @@ async def test_wallet_create_token_x(self):
796796
)
797797
await test_module.wallet_create_token(self.request)
798798

799-
@pytest.mark.asyncio(scope="function")
799+
@pytest.mark.asyncio(loop_scope="function")
800800
async def test_wallet_remove_managed(self):
801801
self.request.has_body = False
802802
self.request.match_info = {"wallet_id": "dummy"}

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ async def asyncSetUp(self):
7575
did_doc_attach=self.did_doc_attach,
7676
)
7777

78-
@pytest.mark.asyncio(scope="function")
78+
@pytest.mark.asyncio(loop_scope="function")
7979
@mock.patch.object(test_module, "DIDXManager")
8080
async def test_called(self, mock_didx_mgr):
8181
mock_didx_mgr.return_value.accept_response = mock.CoroutineMock()
@@ -89,7 +89,7 @@ async def test_called(self, mock_didx_mgr):
8989
)
9090
assert not responder.messages
9191

92-
@pytest.mark.asyncio(scope="function")
92+
@pytest.mark.asyncio(loop_scope="function")
9393
@mock.patch.object(test_module, "DIDXManager")
9494
async def test_called_auto_ping(self, mock_didx_mgr):
9595
self.ctx.update_settings({"auto_ping_connection": True})
@@ -107,7 +107,7 @@ async def test_called_auto_ping(self, mock_didx_mgr):
107107
result, _ = messages[0]
108108
assert isinstance(result, Ping)
109109

110-
@pytest.mark.asyncio(scope="function")
110+
@pytest.mark.asyncio(loop_scope="function")
111111
@mock.patch.object(test_module, "DIDXManager")
112112
@mock.patch.object(connection_target, "ConnectionTarget")
113113
async def test_problem_report(self, mock_conn_target, mock_didx_mgr):
@@ -144,7 +144,7 @@ async def test_problem_report(self, mock_conn_target, mock_didx_mgr):
144144
)
145145
assert target == {"target_list": [mock_conn_target]}
146146

147-
@pytest.mark.asyncio(scope="function")
147+
@pytest.mark.asyncio(loop_scope="function")
148148
@mock.patch.object(test_module, "DIDXManager")
149149
@mock.patch.object(connection_target, "ConnectionTarget")
150150
async def test_problem_report_did_doc(
@@ -191,7 +191,7 @@ async def test_problem_report_did_doc(
191191
)
192192
assert target == {"target_list": [mock_conn_target]}
193193

194-
@pytest.mark.asyncio(scope="function")
194+
@pytest.mark.asyncio(loop_scope="function")
195195
@mock.patch.object(test_module, "DIDXManager")
196196
@mock.patch.object(connection_target, "ConnectionTarget")
197197
async def test_problem_report_did_doc_no_conn_target(

demo/playground/examples/tests/test_mediator_ping_agents.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,21 @@
1616
logger.info("start testing mediated connections...")
1717

1818

19-
@pytest.fixture(scope="session")
19+
@pytest.fixture(loop_scope="session")
2020
def faber():
2121
"""faber agent fixture."""
2222
logger.info(f"faber = {FABER}")
2323
yield Agent(FABER)
2424

2525

26-
@pytest.fixture(scope="session")
26+
@pytest.fixture(loop_scope="session")
2727
def alice():
2828
"""resolver agent fixture."""
2929
logger.info(f"alice = {ALICE}")
3030
yield Agent(ALICE)
3131

3232

33-
@pytest.fixture(scope="session")
33+
@pytest.fixture(loop_scope="session")
3434
def multi_one():
3535
"""resolver agent fixture."""
3636
agent = Agent(MULTI)
@@ -42,7 +42,7 @@ def multi_one():
4242
yield agent
4343

4444

45-
@pytest.fixture(scope="session")
45+
@pytest.fixture(loop_scope="session")
4646
def mediation_invite():
4747
invitation_url = os.getenv("MEDIATOR_INVITATION_URL")
4848
logger.info(f"MEDIATOR_INVITATION_URL = {invitation_url}")
@@ -97,23 +97,23 @@ def initialize_mediation(agent: Agent, invitation):
9797
return result
9898

9999

100-
@pytest.fixture(scope="session")
100+
@pytest.fixture(loop_scope="session")
101101
def faber_mediator(faber, mediation_invite):
102102
logger.info("faber_mediator...")
103103
result = initialize_mediation(faber, mediation_invite)
104104
logger.info(f"...faber_mediator = {result}")
105105
yield result
106106

107107

108-
@pytest.fixture(scope="session")
108+
@pytest.fixture(loop_scope="session")
109109
def alice_mediator(alice, mediation_invite):
110110
logger.info("alice_mediator...")
111111
result = initialize_mediation(alice, mediation_invite)
112112
logger.info(f"...alice_mediator = {result}")
113113
yield result
114114

115115

116-
@pytest.fixture(scope="session")
116+
@pytest.fixture(loop_scope="session")
117117
def multi_one_mediator(multi_one, mediation_invite):
118118
logger.info("multi_one_mediator...")
119119
result = initialize_mediation(multi_one, mediation_invite)

demo/playground/examples/tests/test_ping_agents.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@
1111
from . import ALICE, FABER, MULTI, Agent, logger
1212

1313

14-
@pytest.fixture(scope="session")
14+
@pytest.fixture(loop_scope="session")
1515
def faber():
1616
"""faber agent fixture."""
1717
yield Agent(FABER)
1818

1919

20-
@pytest.fixture(scope="session")
20+
@pytest.fixture(loop_scope="session")
2121
def alice():
2222
"""resolver agent fixture."""
2323
yield Agent(ALICE)
2424

2525

26-
@pytest.fixture(scope="session")
26+
@pytest.fixture(loop_scope="session")
2727
def multi_one():
2828
"""resolver agent fixture."""
2929
agent = Agent(MULTI)
@@ -35,7 +35,7 @@ def multi_one():
3535
yield agent
3636

3737

38-
@pytest.fixture(scope="session", autouse=True)
38+
@pytest.fixture(loop_scope="session", autouse=True)
3939
def alice_faber_connection(faber, alice):
4040
"""Established connection filter."""
4141
logger.info("faber create invitation to alice")
@@ -48,7 +48,7 @@ def alice_faber_connection(faber, alice):
4848
return result
4949

5050

51-
@pytest.fixture(scope="session", autouse=True)
51+
@pytest.fixture(loop_scope="session", autouse=True)
5252
def faber_alice_connection(faber, alice):
5353
"""Established connection filter."""
5454
logger.info("alice create invitation to faber")
@@ -61,7 +61,7 @@ def faber_alice_connection(faber, alice):
6161
return result
6262

6363

64-
@pytest.fixture(scope="session", autouse=True)
64+
@pytest.fixture(loop_scope="session", autouse=True)
6565
def alice_multi_one_connection(multi_one, alice):
6666
"""Established connection filter."""
6767
logger.info("multi_one create invitation to alice")
@@ -74,7 +74,7 @@ def alice_multi_one_connection(multi_one, alice):
7474
return result
7575

7676

77-
@pytest.fixture(scope="session", autouse=True)
77+
@pytest.fixture(loop_scope="session", autouse=True)
7878
def multi_one_alice_connection(multi_one, alice):
7979
"""Established connection filter."""
8080
logger.info("alice create invitation to multi_one")

0 commit comments

Comments
 (0)