Exemplo n.º 1
0
    def test_public_repo_and_default_bitbucket_workspace(self):
        with self.config:
            self.config.get_credentials('bitbucket').returns(
                ripio.Credentials(BITBUCKET_CREDENTIALS))

        sut = ripio.Completion('ripio', self.config)
        self.assertEquals(sut.found, ['bitbucket:DavidVilla/ripio'])
Exemplo n.º 2
0
 def setUp(self):
     self.credentials = ripio.Credentials(BITBUCKET_CREDENTIALS)
     self.public_repos = ['repo{}'.format(x)
                          for x in range(12)] + ['empty', 'ripio']
     self.all_repos = self.public_repos + ['empty', 'private']
     self.prefix = 'bitbucket:'
     self.abbreviated_prefix = 'bb:'
Exemplo n.º 3
0
 def test_already_user(self):
     url = 'https://[email protected]/repo-test/repo11.git'
     expected = 'https://john.doe:[email protected]/repo-test/repo11.git'
     credentials = ripio.Credentials('john.doe:secret')
     sut = ripio.Auth(credentials)
     result = sut.auth(url)
     self.assertEquals(result, expected)
Exemplo n.º 4
0
 def make_repo(cls, name, auth=True):
     creds = ripio.Credentials(BITBUCKET_CREDENTIALS) if auth else None
     print(creds)
     return ripio.BitbucketRepo(name, creds)
Exemplo n.º 5
0
 def setUp(self):
     self.credentials = ripio.Credentials(GITHUB_CREDENTIALS)
     self.all_repos = self.public_repos + ['private', 'empty']
     self.prefix = 'github:'
     self.abbreviated_prefix = 'gh:'
Exemplo n.º 6
0
 def test_bitbucket_credentials(self):
     sut = ripio.ConfigFile('test/fixtures/bitbucket.conf')
     result = sut.get_credentials('bitbucket')
     self.assertEquals(result, ripio.Credentials('john.doe:secret'))
Exemplo n.º 7
0
 def make_repo(cls, name, auth=True):
     creds = ripio.Credentials(GITHUB_CREDENTIALS) if auth else None
     return ripio.GithubRepo(name, creds)