Closed gerlv closed 2 weeks ago
Hi @gerlv
Thank you for taking the time to contribute this fix to the SDK.
If possible, please can you update the test to cover this change.
If you are unable to update the test at this time, please let us know and we will make the change.
Here is a suggested change:
diff --git a/tests/Functional/Resources/NotificationSettings/test_NotificationSettingsClient.py b/tests/Functional/Resources/NotificationSettings/test_NotificationSettingsClient.py
index 5fd65e2..1a6d936 100644
--- a/tests/Functional/Resources/NotificationSettings/test_NotificationSettingsClient.py
+++ b/tests/Functional/Resources/NotificationSettings/test_NotificationSettingsClient.py
@@ -200,12 +200,13 @@ class TestNotificationSettingsClient:
expected_url,
):
expected_url = f"{test_client.base_url}{expected_url}"
- mock_requests.get(expected_url, status_code=expected_response_status)
+ mock_requests.get(expected_url, status_code=expected_response_status, text=expected_response_body)
response = test_client.client.notification_settings.list()
last_request = mock_requests.last_request
assert isinstance(response, NotificationSettingCollection)
+ assert all(isinstance(item, NotificationSetting) for item in response.items), "Not all items are NotificationSetting"
assert last_request is not None
assert last_request.method == 'GET'
assert test_client.client.status_code == expected_response_status
assert all(isinstance(item, NotificationSetting) for item in response.items), "Not all items are NotificationSetting"
Thank you, done! Also verified it passes locally: == 216 passed in 3.05s ====
@gerlv thank you for contributing this fix, we will release this shortly
SDK incorrectly imported
Notification
entity instead ofNotificationSetting
when pulling a list of notification settings.Verified it by installing the package form the head repo and running the same command - no error.
Error log: