Small fixes found by running full db tests

This commit is contained in:
Joseph Schorr 2017-04-24 16:44:46 -04:00
parent a1a4b68306
commit d7f3ef96ce
3 changed files with 8 additions and 8 deletions

View file

@ -23,15 +23,10 @@ class TestRepoModel(unittest.TestCase):
self.ctx.__exit__(True, None, None)
def test_popular_repo_list(self):
# Our repository action count table should have 1 event for the only public
# repo.
onlypublic = model.repository.list_popular_public_repos(0, timedelta(weeks=1))
self.assertEquals(len(onlypublic), 1)
self.assertEquals(onlypublic[0], (PUBLIC_USERNAME, PUBLIC_REPONAME))
self.assertEquals(len(model.repository.list_popular_public_repos(1, timedelta(weeks=1))), 1)
self.assertEquals(len(model.repository.list_popular_public_repos(50, timedelta(weeks=1))), 0)
if __name__ == '__main__':
unittest.main()