def test_getGithubRepos(): thisRepo = GithubRepo('p4r4digm', 'todo-helper') gh = Github(login = settings.ghLogin, password = settings.ghPassword) repos = getGithubRepos(gh, [thisRepo]) for repo in repos: assert repo.owner.login == thisRepo.user assert repo.name == thisRepo.repo
def setup(self): # get a repo with a unicode author string targetRepo = GithubRepo('nnombela','graph.js') # self.repo = Repo() # print "repoexists" gh = Github(login = settings.ghLogin, password = settings.ghPassword) loaded = repoExists(targetRepo.user, targetRepo.repo) # loaded = self.repo.loadFromKey('repos::%s/%s' % ('nnombela', 'graph.js')) if loaded == False: print "cloning" ghr = getGithubRepos(gh, [targetRepo])[0] self.repo = addRepoToRedis(ghr) # if self.repo: # checkoutRepo(repo) # parseRepoForTodos(repo) # deleteLocalRepo(repo) else: self.repo = Repo() self.repo.loadFromKey('repos::%s/%s' % targetRepo)