diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-01-24 12:10:16 +0100 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-01-24 12:10:16 +0100 |
| commit | 79d3adafe204639f01968fd09ea2dfed94e01940 (patch) | |
| tree | ae2332ab72dccf19147315548aed0241f33827ba /tests/gamelocker_test.py | |
| parent | 3ccef39f3fe7c995abd3a7b429bf8e134661097a (diff) | |
| download | python-gamelocker-79d3adafe204639f01968fd09ea2dfed94e01940.tar.gz python-gamelocker-79d3adafe204639f01968fd09ea2dfed94e01940.zip | |
matches: drop arguments, support only parameter dics0.2.0
Diffstat (limited to 'tests/gamelocker_test.py')
| -rw-r--r-- | tests/gamelocker_test.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/gamelocker_test.py b/tests/gamelocker_test.py index 50c1cb7..422c1d2 100644 --- a/tests/gamelocker_test.py +++ b/tests/gamelocker_test.py @@ -49,9 +49,9 @@ class TestGamelocker: assert matches[0].duration > 0 def test_matchesfilters(self, api): - matches1 = api.matches(limit=3) + matches1 = api.matches({"page[limit]": 3}) assert len(matches1) == 3 - matches2 = api.matches(limit=3, offset=1) + matches2 = api.matches({"page[limit]": 3, "page[offset]": 1}) commons = 0 # 3 matches each, offset 1 -> 2 overlap for match1 in matches1: @@ -60,10 +60,10 @@ class TestGamelocker: commons += 1 assert commons == 2 - assert len(api.matches(limit=42)) == 42 + assert len(api.matches({"page[limit]": 42})) == 42 # TODO uncomment as soon as the API is up -# matches = api.matches(limit=10, sort="duration") +# matches = api.matches({"page[limit]": 10, "sort": "duration"}) # assert matches[0].duration < matches[9].duration def fromiso(s): @@ -71,12 +71,12 @@ class TestGamelocker: start = "2017-01-10T02:25:00Z" end = "2017-01-12T02:30:00Z" - matches = api.matches(createdAtStart=start, createdAtEnd=end) + matches = api.matches({"filter[createdAt-start]": start, "filter[createdAt-end]": end}) for match in matches: assert fromiso(end) >= fromiso(match.createdAt) >= fromiso(start) nick = "MMotooks123" - matches = api.matches(limit=5, player=nick) + matches = api.matches({"page[limit]": 5, "filter[playerNames]": nick}) for match in matches: success = False for roster in match.rosters: @@ -87,7 +87,7 @@ class TestGamelocker: assert success team = "HALO" - matches = api.matches(limit=5, team=team) + matches = api.matches({"page[limit]": 5, "filter[teamNames]": team}) for match in matches: success = False for roster in match.rosters: |
