Skip to content

Commit 5f1a75c

Browse files
authored
[MPT-18215] Fix failing unauthorised e2e test (#215)
Fix failing unauthorised e2e test https://softwareone.atlassian.net/browse/MPT-18215 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> Closes [MPT-18215](https://softwareone.atlassian.net/browse/MPT-18215) - Fixed failing unauthorised e2e test by updating import from MPTAPIError to MPTHttpError - Updated test assertion in test_unauthorised to expect MPTHttpError matching "401 Unauthorized" <!-- end of auto-generated comment: release notes by coderabbit.ai --> [MPT-18215]: https://softwareone.atlassian.net/browse/MPT-18215?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
2 parents 46b7f7b + ad5d64f commit 5f1a75c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/e2e/test_access.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import pytest
22

33
from mpt_api_client import MPTClient
4-
from mpt_api_client.exceptions import MPTAPIError
4+
from mpt_api_client.exceptions import MPTHttpError
55

66

77
@pytest.mark.flaky
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(MPTAPIError, match=r"401 Unauthorized"):
11+
with pytest.raises(MPTHttpError, match=r"401 Unauthorized"):
1212
client.catalog.products.fetch_page()
1313

1414

0 commit comments

Comments
 (0)