Skip to content

Conversation

@albertsola
Copy link
Contributor

@albertsola albertsola commented Dec 5, 2025

Summary by CodeRabbit

  • Tests
    • Expanded parameterized tests across multiple catalog resource modules to verify the presence of an "iterate" method on both synchronous and asynchronous service variants, broadening method-presence coverage in many test cases. No production API signatures or runtime behavior were changed.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 5, 2025

Walkthrough

Added the "iterate" method to parameterized mixin presence checks in 16 unit tests under tests/unit/resources/catalog, expanding each test's asserted public method list for both sync and async service classes. No production code or control-flow changes.

Changes

Cohort / File(s) Summary
Test coverage expansion for catalog services
tests/unit/resources/catalog/test_authorizations.py, tests/unit/resources/catalog/test_items.py, tests/unit/resources/catalog/test_listings.py, tests/unit/resources/catalog/test_price_list_items.py, tests/unit/resources/catalog/test_price_lists.py, tests/unit/resources/catalog/test_pricing_policies.py, tests/unit/resources/catalog/test_pricing_policy_attachments.py, tests/unit/resources/catalog/test_product_term_variants.py, tests/unit/resources/catalog/test_product_terms.py, tests/unit/resources/catalog/test_products.py, tests/unit/resources/catalog/test_products_documents.py, tests/unit/resources/catalog/test_products_item_groups.py, tests/unit/resources/catalog/test_products_media.py, tests/unit/resources/catalog/test_products_parameter_groups.py, tests/unit/resources/catalog/test_products_parameters.py, tests/unit/resources/catalog/test_units_of_measure.py
Each test file's parameterized method lists for sync and async service tests were extended to include "iterate", so tests now assert presence of an iterate attribute alongside existing mixin methods. No other test logic changed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Homogeneous, repetitive edits across many files.
  • Test-only changes; focus is verifying consistent parameter updates.
  • Areas to spot-check:
    • tests/unit/resources/catalog/test_price_list_items.py (previous related edits)
    • tests/unit/resources/catalog/test_listings.py
    • tests/unit/resources/catalog/test_units_of_measure.py

Possibly related PRs

Suggested reviewers

  • jentyk
  • d3rky
  • alephsur
  • ruben-sebrango

Poem

🐰
I hopped through tests with nimble feet,
Added "iterate" so checks repeat,
Sync and async now both agree,
More methods shown for all to see,
A tiny change — a joyous treat! 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: adding 'iterate' to expected methods across multiple catalog resource tests.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch add-iterate-unit-tests

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f2c0306 and f87a613.

📒 Files selected for processing (16)
  • tests/unit/resources/catalog/test_authorizations.py (1 hunks)
  • tests/unit/resources/catalog/test_items.py (2 hunks)
  • tests/unit/resources/catalog/test_listings.py (1 hunks)
  • tests/unit/resources/catalog/test_price_list_items.py (1 hunks)
  • tests/unit/resources/catalog/test_price_lists.py (1 hunks)
  • tests/unit/resources/catalog/test_pricing_policies.py (2 hunks)
  • tests/unit/resources/catalog/test_pricing_policy_attachments.py (1 hunks)
  • tests/unit/resources/catalog/test_product_term_variants.py (2 hunks)
  • tests/unit/resources/catalog/test_product_terms.py (2 hunks)
  • tests/unit/resources/catalog/test_products.py (2 hunks)
  • tests/unit/resources/catalog/test_products_documents.py (2 hunks)
  • tests/unit/resources/catalog/test_products_item_groups.py (1 hunks)
  • tests/unit/resources/catalog/test_products_media.py (2 hunks)
  • tests/unit/resources/catalog/test_products_parameter_groups.py (1 hunks)
  • tests/unit/resources/catalog/test_products_parameters.py (1 hunks)
  • tests/unit/resources/catalog/test_units_of_measure.py (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (8)
  • tests/unit/resources/catalog/test_pricing_policies.py
  • tests/unit/resources/catalog/test_authorizations.py
  • tests/unit/resources/catalog/test_pricing_policy_attachments.py
  • tests/unit/resources/catalog/test_products_media.py
  • tests/unit/resources/catalog/test_products_parameters.py
  • tests/unit/resources/catalog/test_products_parameter_groups.py
  • tests/unit/resources/catalog/test_product_term_variants.py
  • tests/unit/resources/catalog/test_products_documents.py
🧰 Additional context used
🧬 Code graph analysis (4)
tests/unit/resources/catalog/test_price_list_items.py (17)
tests/unit/resources/catalog/test_pricing_policy_attachments.py (1)
  • test_methods_present (44-47)
tests/unit/resources/catalog/test_product_term_variants.py (1)
  • test_methods_present (47-50)
tests/unit/resources/catalog/test_product_terms.py (1)
  • test_methods_present (42-45)
tests/unit/resources/catalog/test_products_documents.py (1)
  • test_methods_present (37-40)
tests/unit/resources/catalog/test_products_item_groups.py (1)
  • test_methods_present (34-37)
tests/unit/resources/catalog/test_products_media.py (1)
  • test_methods_present (37-40)
tests/unit/resources/catalog/test_products_parameter_groups.py (1)
  • test_methods_present (39-42)
tests/unit/resources/catalog/test_products_parameters.py (1)
  • test_methods_present (34-37)
tests/unit/resources/commerce/test_agreements_attachments.py (1)
  • test_methods_present (36-39)
tests/unit/resources/accounts/test_account_users.py (1)
  • test_methods_present (27-30)
tests/unit/resources/accounts/test_accounts_users.py (1)
  • test_methods_present (43-46)
tests/unit/resources/billing/test_credit_memo_attachments.py (1)
  • test_methods_present (42-45)
tests/unit/resources/billing/test_custom_ledger_attachments.py (1)
  • test_methods_present (40-43)
tests/unit/resources/billing/test_custom_ledger_charges.py (1)
  • test_methods_present (40-43)
tests/unit/resources/billing/test_invoices.py (1)
  • test_methods_present (27-30)
tests/unit/resources/billing/test_journal_charges.py (1)
  • test_methods_present (38-41)
tests/e2e/catalog/price_lists/items/conftest.py (1)
  • price_list_items_service (5-6)
tests/unit/resources/catalog/test_price_lists.py (13)
tests/unit/resources/catalog/test_authorizations.py (1)
  • test_mixins_present (20-23)
tests/unit/resources/catalog/test_items.py (1)
  • test_mixins_present (29-32)
tests/unit/resources/catalog/test_listings.py (1)
  • test_mixins_present (20-23)
tests/unit/resources/catalog/test_pricing_policies.py (1)
  • test_mixins_present (149-152)
tests/unit/resources/catalog/test_products.py (1)
  • test_mixins_present (64-67)
tests/unit/resources/catalog/test_units_of_measure.py (1)
  • test_mixins_present (20-23)
tests/unit/resources/commerce/test_agreements.py (1)
  • test_mixins_present (110-115)
tests/unit/resources/accounts/test_account.py (1)
  • test_mixins_present (39-42)
tests/unit/resources/accounts/test_buyers.py (1)
  • test_mixins_present (34-37)
tests/unit/resources/accounts/test_accounts_user_groups.py (1)
  • test_mixins_present (51-54)
tests/unit/resources/accounts/test_account_user_groups.py (1)
  • test_mixins_present (45-48)
tests/unit/resources/accounts/test_sellers.py (1)
  • test_mixins_present (22-25)
tests/unit/resources/audit/test_records.py (1)
  • test_mixins_present (17-20)
tests/unit/resources/catalog/test_units_of_measure.py (16)
tests/unit/resources/catalog/test_authorizations.py (1)
  • test_mixins_present (20-23)
tests/unit/resources/catalog/test_items.py (1)
  • test_mixins_present (29-32)
tests/unit/resources/catalog/test_listings.py (1)
  • test_mixins_present (20-23)
tests/unit/resources/catalog/test_price_lists.py (1)
  • test_mixins_present (24-27)
tests/unit/resources/catalog/test_pricing_policies.py (1)
  • test_mixins_present (149-152)
tests/unit/resources/catalog/test_products.py (1)
  • test_mixins_present (64-67)
tests/unit/resources/commerce/test_agreements.py (1)
  • test_mixins_present (110-115)
tests/unit/resources/accounts/test_account.py (1)
  • test_mixins_present (39-42)
tests/unit/resources/accounts/test_buyers.py (1)
  • test_mixins_present (34-37)
tests/unit/resources/accounts/test_accounts_user_groups.py (1)
  • test_mixins_present (51-54)
tests/unit/resources/accounts/test_account_user_groups.py (1)
  • test_mixins_present (45-48)
tests/unit/resources/accounts/test_erp_links.py (1)
  • test_mixins_present (20-23)
tests/unit/resources/accounts/test_user_groups.py (1)
  • test_mixins_present (23-26)
tests/unit/resources/accounts/test_sellers.py (1)
  • test_mixins_present (22-25)
tests/unit/resources/audit/test_event_types.py (1)
  • test_mixins_present (17-20)
tests/unit/resources/audit/test_records.py (1)
  • test_mixins_present (17-20)
tests/unit/resources/catalog/test_listings.py (1)
tests/unit/resources/catalog/test_products.py (1)
  • test_mixins_present (64-67)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (8)
tests/unit/resources/catalog/test_price_lists.py (1)

23-23: LGTM! Test coverage extended to include "iterate" method.

The addition of "iterate" to both sync and async service method checks is consistent and properly verifies the presence of the iterate method on PriceListsService and AsyncPriceListsService.

Also applies to: 30-30

tests/unit/resources/catalog/test_products.py (1)

50-62: LGTM! Consistent addition of "iterate" to both sync and async tests.

The multiline parameterization format is clean and the "iterate" method has been properly added to both ProductsService and AsyncProductsService test coverage.

Also applies to: 70-82

tests/unit/resources/catalog/test_product_terms.py (1)

39-41: LGTM! Test coverage properly extended for term services.

Both TermService and AsyncTermService now verify the presence of the "iterate" method alongside existing methods.

Also applies to: 48-50

tests/unit/resources/catalog/test_products_item_groups.py (1)

33-33: LGTM! Item groups services properly updated.

The "iterate" method presence is now verified for both ItemGroupsService and AsyncItemGroupsService.

Also applies to: 40-40

tests/unit/resources/catalog/test_units_of_measure.py (1)

19-19: LGTM! Units of measure services consistently updated.

Both UnitsOfMeasureService and AsyncUnitsOfMeasureService now include "iterate" in their method presence verification.

Also applies to: 26-26

tests/unit/resources/catalog/test_price_list_items.py (1)

39-39: LGTM! Price list items services properly updated.

The "iterate" method has been added to the test coverage for both PriceListItemsService and AsyncPriceListItemsService.

Also applies to: 46-46

tests/unit/resources/catalog/test_listings.py (1)

19-19: LGTM! Listings services properly updated.

Both ListingsService and AsyncListingsService now verify the presence of the "iterate" method.

Also applies to: 26-26

tests/unit/resources/catalog/test_items.py (1)

16-28: LGTM! Items services comprehensively updated.

The multiline parameterization format clearly shows all methods being verified, and "iterate" has been properly added for both ItemsService and AsyncItemsService.

Also applies to: 35-47


Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Dec 5, 2025

✅ Found Jira issue key in the title: MPT-16242

Generated by 🚫 dangerJS against f87a613

@albertsola albertsola force-pushed the add-iterate-unit-tests branch from f2c0306 to f87a613 Compare December 8, 2025 10:38
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 8, 2025

@albertsola albertsola merged commit 3c15f02 into main Dec 8, 2025
6 checks passed
@albertsola albertsola deleted the add-iterate-unit-tests branch December 8, 2025 11:12
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.

4 participants