Skip to content

Commit a8826d5

Browse files
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
1 parent 019098b commit a8826d5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tests/integration/api/test_17_entry_variants.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def test_include_variants_requires_variant_uid(self, stack, entry_ctx):
3636
class TestEntryVariantsNegative:
3737
def test_fetch_nonexistent(self, stack, entry_ctx):
3838
ct_uid, entry_uid = entry_ctx
39-
resp = stack.content_types(ct_uid).entry(entry_uid).variants("no_such_variant").fetch()
39+
# variants(x) treats x as branch, not variant_uid — pass uid to fetch() instead.
40+
resp = stack.content_types(ct_uid).entry(entry_uid).variants().fetch("no_such_variant")
4041
# Variants API returns 412 (precondition failed, code 1010) for unknown variant.
4142
h.assert_status(resp, 404, 412, 422)

0 commit comments

Comments
 (0)