Skip to content

Commit 5d2b1dd

Browse files
committed
proxy travis tests
1 parent 289f7b5 commit 5d2b1dd

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

tests/.env.example

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
unofficial_token = # Replace this with your BrawlAPI Token
2-
official_token = # Replace this with your Official API token
2+
official_token = # Replace this with your Official API token
3+
official_api_url = # Proxy server to handle requests to API due to IP limitations

tests/officialapi/test_async.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
load_dotenv(find_dotenv('../.env'))
99

1010
TOKEN = os.getenv('official_token')
11+
URL = os.getenv('official_api_url')
1112

1213

1314
class TestAsyncClient(asynctest.TestCase):
@@ -20,6 +21,7 @@ async def setUp(self):
2021
self.client = brawlstats.OfficialAPI(
2122
TOKEN,
2223
is_async=True,
24+
base_url=URL,
2325
timeout=30
2426
)
2527

tests/officialapi/test_blocking.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
load_dotenv(find_dotenv('../.env'))
99

1010
TOKEN = os.getenv('official_token')
11+
URL = os.getenv('official_api_url')
1112

1213

1314
class TestBlockingClient(unittest.TestCase):
@@ -21,6 +22,7 @@ def setUp(self):
2122
self.client = brawlstats.OfficialAPI(
2223
TOKEN,
2324
is_async=False,
25+
base_url=URL,
2426
timeout=30
2527
)
2628

0 commit comments

Comments
 (0)