# Path: ddsc/core/moveutil.py
# class MoveUtil(object):
#     def __init__(self, project, source_remote_path, target_remote_path):
#     def run(self):
#     def get_new_parent(self):
#     def get_new_name(self):
#     def is_folder_or_project(item):
# 
# Path: ddsc/exceptions.py
# class DDSUserException(Exception):
#     """
#     Exception with an error message to be displayed to the user on the command line.
#     """
#     pass


from unittest import TestCase
from ddsc.core.moveutil import MoveUtil, KindType
from ddsc.exceptions import DDSUserException
from mock import Mock
        mock_source = mock_project.get_child_for_path.return_value
        mock_source.change_parent.assert_called_with(mock_parent)
        mock_source.change_parent.return_value.rename.assert_called_with('file2.txt')
        self.assertEqual(result, mock_source.change_parent.return_value.rename.return_value)

    def test_run__noop(self):
        mock_project = Mock()
        move_util = MoveUtil(mock_project, '/data/file1.txt', 'data/file2.txt')
        move_util.get_new_parent = Mock()
        move_util.get_new_parent.return_value = None
        move_util.get_new_name = Mock()
        move_util.get_new_name.return_value = None
        result = move_util.run()
        mock_source = mock_project.get_child_for_path.return_value
        mock_source.change_parent.assert_not_called()
        mock_source.rename.assert_not_called()
        self.assertEqual(result, mock_source)

    def test_get_new_parent__target_is_folder(self):
        mock_project = Mock()
        move_util = MoveUtil(mock_project, '/data/file1.txt', '/data/somedir')
        move_util.is_folder_or_project = Mock()
        move_util.is_folder_or_project.return_value = True
        mock_folder = Mock()
        mock_project.try_get_item_for_path.return_value = mock_folder
        result = move_util.get_new_parent()
        self.assertEqual(result, mock_folder)

    def test_get_new_parent__target_is_file(self):
        mock_project = Mock()

# Path: ddsc/core/moveutil.py
# class MoveUtil(object):
#     def __init__(self, project, source_remote_path, target_remote_path):
#     def run(self):
#     def get_new_parent(self):
#     def get_new_name(self):
#     def is_folder_or_project(item):
# 
# Path: ddsc/exceptions.py
# class DDSUserException(Exception):
#     """
#     Exception with an error message to be displayed to the user on the command line.
#     """
#     pass


# Path: ddsc/core/tests/test_moveutil.py
from unittest import TestCase
from ddsc.core.moveutil import MoveUtil, KindType
from ddsc.exceptions import DDSUserException
from mock import Mock

        mock_source = mock_project.get_child_for_path.return_value
        mock_source.change_parent.assert_called_with(mock_parent)
        mock_source.change_parent.return_value.rename.assert_called_with('file2.txt')
        self.assertEqual(result, mock_source.change_parent.return_value.rename.return_value)

    def test_run__noop(self):
        mock_project = Mock()
        move_util = MoveUtil(mock_project, '/data/file1.txt', 'data/file2.txt')
        move_util.get_new_parent = Mock()
        move_util.get_new_parent.return_value = None
        move_util.get_new_name = Mock()
        move_util.get_new_name.return_value = None
        result = move_util.run()
        mock_source = mock_project.get_child_for_path.return_value
        mock_source.change_parent.assert_not_called()
        mock_source.rename.assert_not_called()
        self.assertEqual(result, mock_source)

    def test_get_new_parent__target_is_folder(self):
        mock_project = Mock()
        move_util = MoveUtil(mock_project, '/data/file1.txt', '/data/somedir')
        move_util.is_folder_or_project = Mock()
        move_util.is_folder_or_project.return_value = True
        mock_folder = Mock()
        mock_project.try_get_item_for_path.return_value = mock_folder
        result = move_util.get_new_parent()
        self.assertEqual(result, mock_folder)

    def test_get_new_parent__target_is_file(self):
        mock_project = Mock()

        move_util = MoveUtil(mock_project, '/data/file1.txt', 'data/file2.txt')