From 7552a25ca68931143332e49edd072bd92e7f9904 Mon Sep 17 00:00:00 2001 From: Mathieu Bridon Date: Wed, 21 Jan 2015 09:33:46 +0100 Subject: [PATCH] Remove remote-calling unit tests These can only fail when building in Koji, as the builder can't access the Internet. --- test/test_credentials.py | 17 ----------------- test/test_repository.py | 8 -------- 2 files changed, 25 deletions(-) diff --git a/test/test_credentials.py b/test/test_credentials.py index 376032f..abcce52 100644 --- a/test/test_credentials.py +++ b/test/test_credentials.py @@ -79,23 +79,6 @@ class CredentialCallback(utils.RepoTestCase): self.assertRaises(Exception, remote.fetch) - def test_bad_cred_type(self): - def credentials_cb(url, username, allowed): - self.assertTrue(allowed & GIT_CREDTYPE_USERPASS_PLAINTEXT) - return Keypair("git", "foo.pub", "foo", "sekkrit") - - remote = self.repo.create_remote("github", "https://github.com/github/github") - remote.credentials = credentials_cb - - self.assertRaises(TypeError, remote.fetch) - -class CallableCredentialTest(utils.RepoTestCase): - - def test_user_pass(self): - remote = self.repo.create_remote("bb", "https://bitbucket.org/libgit2/testgitrepository.git") - remote.credentials = UserPass("libgit2", "libgit2") - - remote.fetch() if __name__ == '__main__': unittest.main() diff --git a/test/test_repository.py b/test/test_repository.py index 7640f39..decb974 100644 --- a/test/test_repository.py +++ b/test/test_repository.py @@ -457,14 +457,6 @@ class CloneRepositoryTest(utils.NoRepoTestCase): self.assertTrue('refs/remotes/custom_remote/master' in repo.listall_references()) self.assertIsNotNone(repo.remotes["custom_remote"]) - def test_clone_with_credentials(self): - credentials = pygit2.UserPass("libgit2", "libgit2") - repo = clone_repository( - "https://bitbucket.org/libgit2/testgitrepository.git", - self._temp_dir, credentials=credentials) - - self.assertFalse(repo.is_empty) - def test_clone_with_checkout_branch(self): # create a test case which isolates the remote test_repo = clone_repository('./test/data/testrepo.git', -- 2.1.0