From 209a46861d0206c1a8aff986c1de429dc683d216 Mon Sep 17 00:00:00 2001 From: Paulo Margarido <64600052+paulomarg@users.noreply.github.com> Date: Wed, 10 Jan 2024 17:22:02 -0300 Subject: [PATCH] Add support for missing API versions --- shopify/api_version.py | 3 +++ test/session_token_test.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/shopify/api_version.py b/shopify/api_version.py index 049ee45c..ba137d57 100644 --- a/shopify/api_version.py +++ b/shopify/api_version.py @@ -34,6 +34,9 @@ def define_known_versions(cls): cls.define_version(Release("2022-10")) cls.define_version(Release("2023-01")) cls.define_version(Release("2023-04")) + cls.define_version(Release("2023-07")) + cls.define_version(Release("2023-10")) + cls.define_version(Release("2024-01")) @classmethod def clear_defined_versions(cls): diff --git a/test/session_token_test.py b/test/session_token_test.py index f94fe0b2..0df7147f 100644 --- a/test/session_token_test.py +++ b/test/session_token_test.py @@ -79,7 +79,7 @@ def test_raises_if_aud_doesnt_match_api_key(self): with self.assertRaises(session_token.SessionTokenError) as cm: session_token.decode_from_header(self.build_auth_header(), api_key=self.api_key, secret=self.secret) - self.assertEqual("Invalid audience", str(cm.exception)) + self.assertEqual("Audience doesn't match", str(cm.exception)) def test_raises_if_issuer_hostname_is_invalid(self): self.payload["iss"] = "bad_shop_hostname"