Skip to content

Commit ffd8e17

Browse files
committed
Fix unit tests for charmhub module
1 parent 68a332e commit ffd8e17

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.Mock(return_value=["12345", "name"])
310+
info_func = mock.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.Mock(return_value=["12345", "name"])
359+
info_func = mock.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)