|
11 | 11 | from tests.utils.fixtures.mock_password_reset import MockPasswordReset |
12 | 12 | from tests.utils.fixtures.mock_user import MockUser |
13 | 13 | from tests.utils.list_resource import list_data_to_dicts, list_response_of |
14 | | -from tests.utils.client_configuration import ( |
15 | | - client_configuration_for_http_client, |
16 | | -) |
17 | 14 | from workos.user_management import AsyncUserManagement, UserManagement |
18 | 15 | from workos.utils.request_helper import RESPONSE_TYPE_CODE |
19 | 16 |
|
@@ -145,13 +142,13 @@ def mock_invitations_multiple_pages(self): |
145 | 142 |
|
146 | 143 | class TestUserManagementBase(UserManagementFixtures): |
147 | 144 | @pytest.fixture(autouse=True) |
148 | | - def setup(self, sync_http_client_for_test): |
149 | | - self.http_client = sync_http_client_for_test |
| 145 | + def setup(self, sync_client_configuration_and_http_client_for_test): |
| 146 | + client_configuration, http_client = ( |
| 147 | + sync_client_configuration_and_http_client_for_test |
| 148 | + ) |
| 149 | + self.http_client = http_client |
150 | 150 | self.user_management = UserManagement( |
151 | | - http_client=self.http_client, |
152 | | - client_configuration=client_configuration_for_http_client( |
153 | | - sync_http_client_for_test |
154 | | - ), |
| 151 | + http_client=self.http_client, client_configuration=client_configuration |
155 | 152 | ) |
156 | 153 |
|
157 | 154 | def test_authorization_url_throws_value_error_with_missing_connection_organization_and_provider( |
@@ -317,13 +314,13 @@ def test_get_logout_url(self): |
317 | 314 |
|
318 | 315 | class TestUserManagement(UserManagementFixtures): |
319 | 316 | @pytest.fixture(autouse=True) |
320 | | - def setup(self, sync_http_client_for_test): |
321 | | - self.http_client = sync_http_client_for_test |
| 317 | + def setup(self, sync_client_configuration_and_http_client_for_test): |
| 318 | + client_configuration, http_client = ( |
| 319 | + sync_client_configuration_and_http_client_for_test |
| 320 | + ) |
| 321 | + self.http_client = http_client |
322 | 322 | self.user_management = UserManagement( |
323 | | - http_client=self.http_client, |
324 | | - client_configuration=client_configuration_for_http_client( |
325 | | - sync_http_client_for_test |
326 | | - ), |
| 323 | + http_client=self.http_client, client_configuration=client_configuration |
327 | 324 | ) |
328 | 325 |
|
329 | 326 | def test_get_user(self, mock_user, capture_and_mock_http_client_request): |
@@ -957,13 +954,13 @@ def test_revoke_invitation( |
957 | 954 | @pytest.mark.asyncio |
958 | 955 | class TestAsyncUserManagement(UserManagementFixtures): |
959 | 956 | @pytest.fixture(autouse=True) |
960 | | - def setup(self, async_http_client_for_test): |
961 | | - self.http_client = async_http_client_for_test |
| 957 | + def setup(self, async_client_configuration_and_http_client_for_test): |
| 958 | + client_configuration, http_client = ( |
| 959 | + async_client_configuration_and_http_client_for_test |
| 960 | + ) |
| 961 | + self.http_client = http_client |
962 | 962 | self.user_management = AsyncUserManagement( |
963 | | - http_client=self.http_client, |
964 | | - client_configuration=client_configuration_for_http_client( |
965 | | - async_http_client_for_test |
966 | | - ), |
| 963 | + http_client=self.http_client, client_configuration=client_configuration |
967 | 964 | ) |
968 | 965 |
|
969 | 966 | async def test_get_user(self, mock_user, capture_and_mock_http_client_request): |
|
0 commit comments