Skip to content

Commit 076d335

Browse files
Merge pull request #187 from contentstack/fix/entry-variants-fetch-nonexistent
fix(test): correct entry variants fetch_nonexistent to use fetch(uid) pattern
2 parents 019098b + a8826d5 commit 076d335

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)