Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
atarkowska committed Nov 19, 2017
1 parent a4ff210 commit d9c2f00
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/integration/test_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,22 +160,22 @@ def test_list(self, client, _model, _camelcase, _view, _view_args,

# Meta
assert rsp['meta']['pagination']['page'] == 1
assert rsp['meta']['pagination']['pages'] == 5
assert rsp['meta']['pagination']['pages'] == 4
assert rsp['meta']['pagination']['count'] == 100

# Links
host = "http://testserver/%s" % api_version
_view_url = _view.split(":")[1]
first_link = '%s/%s?page=1' % (host, _view_url)
last_link = '%s/%s?page=5' % (host, _view_url)
last_link = '%s/%s?page=4' % (host, _view_url)
next_link = '%s/%s?page=2' % (host, _view_url)
assert rsp['links']['first'] == first_link
assert rsp['links']['last'] == last_link
assert rsp['links']['next'] == next_link
assert rsp['links']['prev'] is None

# Data
assert len(rsp['data']) == 20
assert len(rsp['data']) == 25

for d in rsp['data']:
assert d['type'] == _camelcase
Expand Down

0 comments on commit d9c2f00

Please sign in to comment.