예제 #1
0
 def test_execute_client_strategy_common(self, mock_1):
     obj_to_iterate: list = [
         default_code.ResultObj(Actions.CLIENT_UPDATE_FILE).result,
         default_code.ResultObj(Actions.CLIENT_NEW_FOLDER).result,
         default_code.ResultObj(Actions.CLIENT_NEW_FILE).result,
         default_code.ResultObj(Actions.SERVER_NEW_FOLDER).result,
         default_code.ResultObj(Actions.SERVER_NEW_FILE).result
     ]
     logger = default_code.FakeLogger()
     self.client_strategy.execute(obj_to_iterate, logger)
     self.assertEqual(mock_1.call_count, 5)
예제 #2
0
 def test_execute_client_strategy_server_update_file(self, mock_1, mock_2):
     obj_to_iterate: list = [
         default_code.ResultObj(Actions.SERVER_UPDATE_FILE).result
     ]
     logger = default_code.FakeLogger()
     self.client_strategy.execute(obj_to_iterate, logger)
     mock_1.assert_called_once()
     mock_2.assert_called_once()
예제 #3
0
 def test_execute_manual_strategy_server_update_file_none(
         self, mock_1, mock_2, mock_3):
     obj_to_iterate: list = [
         default_code.ResultObj(Actions.SERVER_UPDATE_FILE, 0,
                                "name.ciao.we").result
     ]
     logger = default_code.FakeLogger()
     self.manual_strategy.execute(obj_to_iterate, logger)
     mock_1.assert_called_once()
     mock_2.assert_called_once()
     mock_3.assert_called_once()