def test_transmit_learner_data(
self,
command_kwargs,
certificate,
self_paced,
end_date,
passed,
expected_completion,
):
"""
Test the log output from a successful run of the transmit_learner_data management command,
using all the ways we can invoke it.
"""
with transmit_learner_data_context(command_kwargs, certificate, self_paced, end_date, passed) as (args, kwargs):
with LogCapture(level=logging.INFO) as log_capture:
expected_output = get_expected_output(**expected_completion)
call_command('transmit_learner_data', *args, **kwargs)
for index, message in enumerate(expected_output):
assert message in log_capture.records[index].getMessage()
评论列表
文章目录