Skip to content

Commit 4e7014a

Browse files
Henry Chanhenrylamchan
authored andcommitted
PR Feedback
1 parent 267573c commit 4e7014a

File tree

3 files changed

+21
-7
lines changed

3 files changed

+21
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# workos-python
22

3-
Pyhon SDK to conveniently access the [WorkOS] API(https://workos.com).
3+
Pyhon SDK to conveniently access the [WorkOS API](https://workos.com).
44

55
## Installation
66

tests/test_client.py

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,27 @@ def test_initialize_sso(self, set_api_key_and_project_id):
1212
assert bool(client.sso)
1313

1414
def test_initialize_sso_missing_api_key(self, set_project_id):
15-
with pytest.raises(ConfigurationException):
15+
with pytest.raises(ConfigurationException) as ex:
1616
client.sso
1717

18+
message = str(ex)
19+
20+
assert 'api_key' in message
21+
assert 'project_id' not in message
22+
1823
def test_initialize_sso_missing_project_id(self, set_api_key):
19-
with pytest.raises(ConfigurationException):
24+
with pytest.raises(ConfigurationException) as ex:
2025
client.sso
2126

22-
27+
message = str(ex)
28+
29+
assert 'project_id' in message
30+
assert 'api_key' not in message
31+
32+
def test_initialize_sso_missing_api_key_and_project_id(self):
33+
with pytest.raises(ConfigurationException) as ex:
34+
client.sso
35+
36+
message = str(ex)
37+
38+
assert all(setting in message for setting in ('api_key', 'project_id',))

workos/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
from workos.__about__ import __version__
22
from workos.client import client
33

4-
BASE_API_URL = 'https://api.workos.com/'
5-
64
api_key = None
75
project_id = None
8-
base_api_url = BASE_API_URL
6+
base_api_url = 'https://api.workos.com/'

0 commit comments

Comments
 (0)