Beispiel #1
0
    def test_existing_data_should_stop_services(self, _stop_services_mock,
                                                _start_services_mock,
                                                _copy_with_overwrite_mock):
        pallet = Pallet()
        pallet.static_data = [check_for_changes_gdb]

        lift.update_static_for([pallet], [path.join(current_folder, 'data')],
                               True)

        _stop_services_mock.assert_called_once()
        _start_services_mock.assert_called_once()
Beispiel #2
0
    def test_no_existing_data(self, _stop_services_mock, _start_services_mock,
                              _copy_with_overwrite_mock):
        pallet = Pallet()
        pallet.static_data = [check_for_changes_gdb]

        lift.update_static_for([pallet], ['blah'], True)

        _stop_services_mock.assert_not_called()
        _start_services_mock.assert_not_called()
        _copy_with_overwrite_mock.assert_called_once_with(
            check_for_changes_gdb, path.join('blah', 'checkForChanges.gdb'))
Beispiel #3
0
    def test_no_force_existing_data_does_not_copy(self, _stop_services_mock,
                                                  _start_services_mock,
                                                  _copy_with_overwrite_mock):
        pallet = Pallet()
        pallet.static_data = [check_for_changes_gdb]

        lift.update_static_for([pallet], [path.join(current_folder, 'data')],
                               False)

        _stop_services_mock.assert_not_called()
        _start_services_mock.assert_not_called()
        _copy_with_overwrite_mock.assert_not_called()