Esempio n. 1
0
 def test_git(self):
     repo = Repository(
         url='http://example.com/git-repo',
         backend=RepositoryBackend.git,
     )
     result = repo.get_vcs()
     assert type(result) == GitVcs
Esempio n. 2
0
 def test_unknown(self):
     repo = Repository(
         url='http://example.com/git-repo',
         backend=RepositoryBackend.unknown,
     )
     result = repo.get_vcs()
     assert result is None
Esempio n. 3
0
 def test_hg(self):
     repo = Repository(
         url='http://example.com/git-repo',
         backend=RepositoryBackend.hg,
     )
     result = repo.get_vcs()
     assert type(result) == MercurialVcs
Esempio n. 4
0
 def test_git(self):
     repo = Repository(url="http://example.com/git-repo", backend=RepositoryBackend.git)
     result = repo.get_vcs()
     assert type(result) == GitVcs
Esempio n. 5
0
 def test_unknown(self):
     repo = Repository(url="http://example.com/git-repo", backend=RepositoryBackend.unknown)
     result = repo.get_vcs()
     assert result is None
Esempio n. 6
0
 def test_hg(self):
     repo = Repository(url="http://example.com/git-repo", backend=RepositoryBackend.hg)
     result = repo.get_vcs()
     assert type(result) == MercurialVcs