def call_h1sync(*args, reports=None):
if reports is None:
reports = []
with mock.patch('dashboard.h1.find_reports') as mock_find_reports:
mock_find_reports.return_value = reports
out = io.StringIO()
call_command('h1sync', *args, stdout=out)
return out.getvalue(), mock_find_reports
评论列表
文章目录