diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-02-05 10:55:54 +0100 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-02-05 10:55:54 +0100 |
| commit | 493044d885f465b7f79a2bb6cb0cdac1f32a2bdb (patch) | |
| tree | 932aafd5f9593097ed41184a2af8382a8de34e42 /tests | |
| parent | c1fb8e31aa791548254a2d6e8c37f4403d24fd7b (diff) | |
| download | python-gamelocker-493044d885f465b7f79a2bb6cb0cdac1f32a2bdb.tar.gz python-gamelocker-493044d885f465b7f79a2bb6cb0cdac1f32a2bdb.zip | |
region support from global to local parameter
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/gamelocker_test.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/gamelocker_test.py b/tests/gamelocker_test.py index 422c1d2..9fce0a0 100644 --- a/tests/gamelocker_test.py +++ b/tests/gamelocker_test.py @@ -48,6 +48,14 @@ class TestGamelocker: assert isinstance(matches[0], gamelocker.datatypes.Match) assert matches[0].duration > 0 + def test_region(self, api): + assert len(api.matches(region="na", + params={"filter[playerNames]": "Kraken"})) > 0 + assert len(api.matches(region="eu", + params={"filter[playerNames]": "Bayu"})) > 0 + assert len(api.matches(region="sg", + params={"filter[playerNames]": "idmonfish"})) > 0 + def test_matchesfilters(self, api): matches1 = api.matches({"page[limit]": 3}) assert len(matches1) == 3 @@ -60,9 +68,9 @@ class TestGamelocker: commons += 1 assert commons == 2 - assert len(api.matches({"page[limit]": 42})) == 42 + # broken on server side +# assert len(api.matches({"page[limit]": 42})) == 42 - # TODO uncomment as soon as the API is up # matches = api.matches({"page[limit]": 10, "sort": "duration"}) # assert matches[0].duration < matches[9].duration |
