From a8826d5729504fc6430bcb11d4f70ad6f456c8f6 Mon Sep 17 00:00:00 2001 From: aniket-shikhare-cstk Date: Mon, 31 Aug 2026 04:33:33 +0530 Subject: [PATCH] fix(test): correct entry variants fetch_nonexistent to use fetch(uid) pattern variants(x) treats its single positional arg as a branch UID, not a variant UID, so variants("no_such_variant").fetch() left variant_uid=None and hit the client-side ArgumentException guard before the HTTP call. Fix: pass the UID to fetch() directly, which is the correct SDK pattern. Generated by Claude Code --- tests/integration/api/test_17_entry_variants.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/integration/api/test_17_entry_variants.py b/tests/integration/api/test_17_entry_variants.py index 5fce336..9746e58 100644 --- a/tests/integration/api/test_17_entry_variants.py +++ b/tests/integration/api/test_17_entry_variants.py @@ -36,6 +36,7 @@ def test_include_variants_requires_variant_uid(self, stack, entry_ctx): class TestEntryVariantsNegative: def test_fetch_nonexistent(self, stack, entry_ctx): ct_uid, entry_uid = entry_ctx - resp = stack.content_types(ct_uid).entry(entry_uid).variants("no_such_variant").fetch() + # variants(x) treats x as branch, not variant_uid — pass uid to fetch() instead. + resp = stack.content_types(ct_uid).entry(entry_uid).variants().fetch("no_such_variant") # Variants API returns 412 (precondition failed, code 1010) for unknown variant. h.assert_status(resp, 404, 412, 422)