Skip to content

Conversation

@sunil-lakshman
Copy link
Contributor

@sunil-lakshman sunil-lakshman commented Jul 9, 2025

  1. Variants support Added.
  2. Added variants testcases

@sunil-lakshman sunil-lakshman requested a review from a team as a code owner July 9, 2025 07:24

This comment was marked as outdated.

@sunil-lakshman sunil-lakshman requested a review from Copilot July 9, 2025 07:35

This comment was marked as outdated.

@sunil-lakshman sunil-lakshman requested a review from Copilot July 9, 2025 10:48
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces support for fetching and testing entry variants in the Python CDA SDK.

  • Adds a new Variants class with find and fetch methods
  • Exposes .variants() on Entry and ContentType
  • Adds corresponding unit tests and updates SDK version and changelog

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/test_entry.py Adds VARIANT_UID and 4 new variant-related test cases
contentstack/variants.py Implements Variants class for variant endpoints
contentstack/entry.py Adds .variants() method to Entry
contentstack/contenttype.py Adds .variants() method to ContentType
contentstack/init.py Bumps SDK version to v2.2.0
CHANGELOG.md Documents variants support under v2.2.0
Comments suppressed due to low confidence (3)

tests/test_entry.py:153

  • Duplicate test identifier 'test_25_' found. Rename this test to a unique sequential number (e.g., test_26_) to avoid collisions in the test suite.
    def test_25_content_type_entry_variants_with_has_hash_variant(self):

contentstack/variants.py:72

  • [nitpick] Duplicate docstring block detected. Consolidate the variant-fetching description into a single docstring to avoid redundancy.
        """

contentstack/variants.py:36

  • The params argument in find isn't covered by existing tests; consider adding a test to verify that query parameters are correctly encoded and sent.
    def find(self, params=None):

@sunil-lakshman sunil-lakshman merged commit 51f5fd9 into development Jul 9, 2025
10 checks passed
@sunil-lakshman sunil-lakshman deleted the enh/dx-3059 branch July 9, 2025 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants