瀏覽代碼

fix logs_monitor_start_error()

Signed-off-by: Soumik Dutta <shalearkane@gmail.com>
Soumik Dutta 2 年之前
父節點
當前提交
f442aeae9c
共有 1 個文件被更改,包括 3 次插入5 次删除
  1. 3 5
      tests/unit/commands/test_borgmatic.py

+ 3 - 5
tests/unit/commands/test_borgmatic.py

@@ -40,11 +40,9 @@ def test_run_configuration_logs_monitor_start_error():
     flexmock(module.borg_version).should_receive('local_borg_version').and_return(flexmock())
     flexmock(module.borg_version).should_receive('local_borg_version').and_return(flexmock())
     flexmock(module.dispatch).should_receive('call_hooks').and_raise(OSError).and_return(
     flexmock(module.dispatch).should_receive('call_hooks').and_raise(OSError).and_return(
         None
         None
-    ).and_return(None)
-    expected_results = [flexmock(), flexmock()]
-    flexmock(module).should_receive('log_error_records').and_return(
-        [expected_results[0]]
-    ).and_return([expected_results[1]])
+    ).and_return(None).and_return(None)
+    expected_results = [flexmock()]
+    flexmock(module).should_receive('log_error_records').and_return(expected_results)
     flexmock(module).should_receive('run_actions').never()
     flexmock(module).should_receive('run_actions').never()
     config = {'location': {'repositories': ['foo']}}
     config = {'location': {'repositories': ['foo']}}
     arguments = {'global': flexmock(monitoring_verbosity=1, dry_run=False), 'create': flexmock()}
     arguments = {'global': flexmock(monitoring_verbosity=1, dry_run=False), 'create': flexmock()}