def test_should_return_list_with_empty_string_when_configuration_directory_has_been_created_in_commit(self):

        mock_svn_service = Mock(SvnService)
        mock_svn_service.get_changed_paths_with_action.return_value = [('', 'A')]

        actual = SvnService.get_changed_paths(mock_svn_service, '1980')

        self.assertEqual([''], actual)
    def test_should_return_list_with_directory_name_and_path_to_file_when_a_file_has_been_added_and_another_has_been_deleted(self):

        mock_svn_service = Mock(SvnService)
        mock_svn_service.get_changed_paths_with_action.return_value = [('', 'A'), ('spam.egg', 'A'), ('foo.bar', 'D')]

        actual = SvnService.get_changed_paths(mock_svn_service, '1980')

        self.assertEqual(['', 'spam.egg', 'foo.bar'], actual)
Ejemplo n.º 3
0
    def test_should_return_changed_paths(self):

        service = SvnService(self.repo_url,
                             None,
                             None,
                             path_to_config=get_svn_path_to_config())

        self.assertEqual(['typ/web/data/index.html'],
                         service.get_changed_paths(2))
    def test_should_return_changed_paths(self):

        service = SvnService(self.repo_url, None, None, path_to_config=get_svn_path_to_config())

        self.assertEqual(['typ/web/data/index.html'], service.get_changed_paths(2))