Skip to content

Commit f1e94f2

Browse files
committed
Refactor to correct linting errors
1 parent 28f75fc commit f1e94f2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

notificationapi_python_server_sdk/notificationapi.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ def init(client_id, client_secret, base_url=None):
2121
__client_id = client_id
2222
global __client_secret
2323
__client_secret = client_secret
24-
2524
global __base_url
2625
if base_url:
2726
__base_url = base_url
2827
else:
2928
__base_url = US_REGION
3029

30+
3131
async def request(method, uri, data=None, custom_auth=None, queryStrings=None):
3232
api_url = f"{__base_url}/{__client_id}/{uri}"
3333

@@ -53,7 +53,6 @@ async def request(method, uri, data=None, custom_auth=None, queryStrings=None):
5353
response.text,
5454
data,
5555
)
56-
5756
return response
5857

5958

tests/test_notificationapi_regions.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,15 @@ def test_init_with_ca_region():
2525
notificationapi.init(client_id, client_secret, CA_REGION)
2626
assert notificationapi.__base_url == CA_REGION
2727

28+
2829
@pytest.mark.asyncio
2930
async def test_request_uses_correct_region_url(respx_mock):
3031
# Test with EU region
3132
eu_api_url = f"{EU_REGION}/{client_id}/sender"
3233
route = respx_mock.post(eu_api_url).mock(return_value=httpx.Response(200))
33-
34+
3435
notificationapi.init(client_id, client_secret, EU_REGION)
3536
await notificationapi.send({"notificationId": "test", "user": {"id": "user1"}})
36-
37+
3738
assert route.called
38-
assert route.calls.last.request.url == eu_api_url
39+
assert route.calls.last.request.url == eu_api_url

0 commit comments

Comments
 (0)