Move public repo test to pytest
This commit is contained in:
parent
a830d53212
commit
2d7b4dd1bf
2 changed files with 8 additions and 32 deletions
|
@ -1,3 +1,5 @@
|
|||
from datetime import timedelta
|
||||
|
||||
import pytest
|
||||
|
||||
from peewee import IntegrityError
|
||||
|
@ -43,3 +45,9 @@ def test_search_pagination(query, authed_username, initialized_db):
|
|||
next_repos = get_filtered_matching_repositories(query, filter_username=authed_username, offset=1)
|
||||
assert repositories[0].id != next_repos[0].id
|
||||
assert repositories[1].id == next_repos[0].id
|
||||
|
||||
|
||||
def test_popular_repo_list(initialized_db):
|
||||
onlypublic = model.repository.list_popular_public_repos(0, timedelta(weeks=1))
|
||||
assert len(onlypublic) == 1
|
||||
assert onlypublic[0] == ('public', 'publicrepo')
|
||||
|
|
Reference in a new issue