def test_get_git_repository_remote_url_returns_repo_url_from_parent_dir(self, repo_mock):
        url = "http://config.repo.git"
        repo_object_mock = Mock()
        repo_object_mock.remotes.origin.url = url
        repo_mock.side_effect = [InvalidGitRepositoryError, repo_object_mock]

        self.assertEqual(url, util.get_git_repository_remote_url(tempfile.mkdtemp()))