Skip to content

Commit 9ef1497

Browse files
authored
MPT-19657 fix unauthorized response in E2E tests (#253)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> Closes [MPT-19657](https://softwareone.atlassian.net/browse/MPT-19657) - Updated E2E authorization test to expect "401 Authentication Failed" error message instead of "401 Unauthorized" when validating responses with invalid API tokens <!-- end of auto-generated comment: release notes by coderabbit.ai --> [MPT-19657]: https://softwareone.atlassian.net/browse/MPT-19657?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
2 parents fab87cd + 2973ac3 commit 9ef1497

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/e2e/test_access.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
def test_unauthorised(base_url):
99
client = MPTClient.from_config(api_token="TKN-invalid", base_url=base_url) # noqa: S106
1010

11-
with pytest.raises(MPTHttpError, match=r"401 Unauthorized"):
11+
with pytest.raises(MPTHttpError, match=r"401 Authentication Failed"):
1212
client.catalog.products.fetch_page()
1313

1414

0 commit comments

Comments
 (0)