Skip to content

Commit b685df8

Browse files
committed
Use base.AsyncMock (for python<=37) in unit tests
1 parent ffd8e17 commit b685df8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/unit/test_bundle.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ async def test_run_with_charmhub_charm(self, event_loop):
307307
context.trusted = False
308308
context.model = model
309309

310-
info_func = mock.AsyncMock(return_value=["12345", "name"])
310+
info_func = base.AsyncMock(return_value=["12345", "name"])
311311

312312
with patch.object(charmhub.CharmHub, 'get_charm_id', info_func):
313313
result = await change.run(context)
@@ -356,7 +356,7 @@ async def test_run_with_charmhub_charm_no_channel(self, event_loop):
356356
context.trusted = False
357357
context.model = model
358358

359-
info_func = mock.AsyncMock(return_value=["12345", "name"])
359+
info_func = base.AsyncMock(return_value=["12345", "name"])
360360

361361
with patch.object(charmhub.CharmHub, 'get_charm_id', info_func):
362362
result = await change.run(context)

0 commit comments

Comments
 (0)