Skip to content

Commit

Permalink
Increase coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
teleyinex committed Jun 8, 2017
1 parent 8d0d71c commit 2ecc81b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/test_web.py
Expand Up @@ -211,6 +211,18 @@ def test_leaderboard_json(self):
assert len(leaders) == (20+3+1+3), len(leaders)
assert leaders[23]['name'] == user.name

res = self.app_get_json('/leaderboard/window/11?api_key=%s' % user.api_key)
data = json.loads(res.data)
err_msg = 'Top users missing'
assert 'top_users' in data, err_msg
err_msg = 'leaderboard user information missing'
leaders = data['top_users']
for u in leaders:
print u['rank'], u['name'], u['score']
assert len(leaders) == (20+10+1+10), len(leaders)
assert leaders[30]['name'] == user.name



@with_context
def test_announcement_json(self):
Expand Down

0 comments on commit 2ecc81b

Please sign in to comment.