Closed robmoorman closed 2 years ago
I believe that pytest fixture is for the old API. The new fixture is ct_platform_client: PlatformClient
. See https://github.com/labd/commercetools-python-sdk/blob/main/tests/platform/test_expand.py#L7
I believe that pytest fixture is for the old API. The new fixture is
ct_platform_client: PlatformClient
. See https://github.com/labd/commercetools-python-sdk/blob/main/tests/platform/test_expand.py#L7
Ok let me confirm this
When using the (as docs described) Client imported from
from commercetools.platform import Client
the pytest fixturecommercetools_api
doesn't work.It looks like no http requests are mocked and actual requests are triggered (instead of using the mocker), causing the
invalid token
exception.Using the "old"
from commercetools.import Client
fixes the problem (although it uses a slighly different API).Tested with commercetools version 14.