Fix tests in Python 3.6.
This commit is contained in:
parent
1c825b5d84
commit
1ba56d5262
1 changed files with 3 additions and 3 deletions
|
@ -11,15 +11,15 @@ def test_execute_and_log_output_logs_each_line_separately():
|
||||||
flexmock(module.logger).should_receive('log').with_args(logging.INFO, 'hi').once()
|
flexmock(module.logger).should_receive('log').with_args(logging.INFO, 'hi').once()
|
||||||
flexmock(module.logger).should_receive('log').with_args(logging.INFO, 'there').once()
|
flexmock(module.logger).should_receive('log').with_args(logging.INFO, 'there').once()
|
||||||
|
|
||||||
module.execute_and_log_output(['echo', 'hi\nthere'], output_log_level=logging.INFO, shell=False)
|
module.execute_and_log_output(['echo', 'hi'], output_log_level=logging.INFO, shell=False)
|
||||||
|
module.execute_and_log_output(['echo', 'there'], output_log_level=logging.INFO, shell=False)
|
||||||
|
|
||||||
|
|
||||||
def test_execute_and_log_output_logs_borg_error_as_error():
|
def test_execute_and_log_output_logs_borg_error_as_error():
|
||||||
flexmock(module.logger).should_receive('error').with_args('borg: error: oopsie').once()
|
flexmock(module.logger).should_receive('error').with_args('borg: error: oopsie').once()
|
||||||
flexmock(module.logger).should_receive('log').with_args(logging.INFO, 'daisie').once()
|
|
||||||
|
|
||||||
module.execute_and_log_output(
|
module.execute_and_log_output(
|
||||||
['echo', 'borg: error: oopsie\ndaisie\n'], output_log_level=logging.INFO, shell=False
|
['echo', 'borg: error: oopsie'], output_log_level=logging.INFO, shell=False
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue