def test_logs_messages_with_alternative_levels(self, mock_call):
alternative_levels = [
hookenv.CRITICAL,
hookenv.ERROR,
hookenv.WARNING,
hookenv.INFO,
]
for level in alternative_levels:
hookenv.log('foo', level)
mock_call.assert_called_with(['juju-log', '-l', level, 'foo'])
评论列表
文章目录