def run(self):
        """Copy version files"""
        utils.create_dir_if_not_exists(self.release_dir)
        utils.copy_if_exists(self.version_path_5_0, self.dst_version_path_5_0)

        # NOTE(eli): in case of failed upgrade
        # from 5.0 to 5.0.1 file for 5.0.1 can
        # be there, but in fact 5.0.1 was not
        # installed
        if self.config.from_version == '5.0.1':
            utils.copy_if_exists(
                self.version_path_5_0_1,
                self.dst_version_path_5_0_1)
Exemplo n.º 2
0
    def run(self):
        """Copy version files
        """
        utils.create_dir_if_not_exists(self.release_dir)
        utils.copy_if_exists(self.version_path_5_0, self.dst_version_path_5_0)

        # NOTE(eli): in case of failed upgrade
        # from 5.0 to 5.0.1 file for 5.0.1 can
        # be there, but in fact 5.0.1 was not
        # installed
        if self.config.from_version == '5.0.1':
            utils.copy_if_exists(
                self.version_path_5_0_1,
                self.dst_version_path_5_0_1)
 def test_copy_if_exists_file_exists(
         self, copy_mock, exists_mock):
     utils.copy_if_exists('from', 'to')
     exists_mock.assert_called_once_with('from')
     copy_mock.assert_called_once_with('from', 'to')
 def test_copy_if_exists_file_does_not_exist(
         self, copy_mock, exists_mock):
     utils.copy_if_exists('from', 'to')
     exists_mock.assert_called_once_with('from')
     self.method_was_not_called(copy_mock)
Exemplo n.º 5
0
 def test_copy_if_exists_file_exists(self, copy_mock, exists_mock):
     utils.copy_if_exists('from', 'to')
     exists_mock.assert_called_once_with('from')
     copy_mock.assert_called_once_with('from', 'to')
Exemplo n.º 6
0
 def test_copy_if_exists_file_does_not_exist(self, copy_mock, exists_mock):
     utils.copy_if_exists('from', 'to')
     exists_mock.assert_called_once_with('from')
     self.method_was_not_called(copy_mock)