MPT-14898 E2E for catalog units of measure#146
Conversation
WalkthroughAdds end-to-end pytest fixtures and parallel async/sync test modules for the catalog units_of_measure service, covering retrieval, filtering, update, and not-found error cases; creation tests are present but skipped. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20–30 minutes
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (2)
🧰 Additional context used🧠 Learnings (2)📓 Common learnings📚 Learning: 2025-11-27T00:05:36.356ZApplied to files:
🧬 Code graph analysis (1)tests/e2e/catalog/units_of_measure/conftest.py (1)
⏰ 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)
🔇 Additional comments (2)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
tests/e2e/catalog/units_of_measure/conftest.py(1 hunks)tests/e2e/catalog/units_of_measure/test_async_units_of_measure.py(1 hunks)tests/e2e/catalog/units_of_measure/test_sync_units_of_measure.py(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
tests/e2e/catalog/units_of_measure/conftest.py (1)
tests/e2e/conftest.py (2)
mpt_ops(31-32)e2e_config(89-92)
tests/e2e/catalog/units_of_measure/test_sync_units_of_measure.py (6)
mpt_api_client/exceptions.py (1)
MPTAPIError(20-42)tests/e2e/helper.py (1)
assert_service_filter_with_iterate(42-50)tests/e2e/catalog/units_of_measure/test_async_units_of_measure.py (1)
test_create(15-19)tests/e2e/catalog/units_of_measure/conftest.py (2)
units_of_measure_service(5-6)unit_of_measure_id(10-11)tests/e2e/conftest.py (1)
short_uuid(101-102)mpt_api_client/models/model.py (1)
id(119-121)
⏰ 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 (11)
tests/e2e/catalog/units_of_measure/conftest.py (1)
4-11: LGTM!The fixtures are well-defined and follow pytest conventions. They provide clean access to the units of measure service and test configuration.
tests/e2e/catalog/units_of_measure/test_sync_units_of_measure.py (4)
9-14: LGTM!The test is appropriately marked as skipped with a clear reason. The placeholder implementation looks correct for when the create functionality is ready.
17-20: LGTM!The test correctly verifies that the retrieved unit of measure has the expected ID.
31-35: LGTM!The test correctly verifies that a 404 error is raised for non-existent IDs.
38-45: LGTM!The test correctly updates a unit of measure and verifies the change. Note that this test mutates shared test data, which aligns with the module's flaky marker indicating awareness of potential test isolation concerns.
tests/e2e/catalog/units_of_measure/test_async_units_of_measure.py (6)
9-11: LGTM!The async service fixture is correctly defined using async_mpt_ops. Defining it locally in the test file is appropriate for async-specific fixtures.
14-19: LGTM!The async test placeholder is correctly marked as skipped and uses proper async/await syntax.
22-25: LGTM!The async test correctly retrieves a unit of measure and verifies the ID matches. Proper use of await.
28-31: LGTM!The async filter test correctly uses the unit_of_measure_id fixture and properly awaits the helper function.
34-38: LGTM!The async test correctly verifies 404 error handling with proper use of pytest.raises and await.
41-50: LGTM!The async update test correctly uses await and verifies the name change. Like the sync version, this mutates shared data, which is acknowledged by the flaky marker.
tests/e2e/catalog/units_of_measure/test_sync_units_of_measure.py
Outdated
Show resolved
Hide resolved
9f9af6e to
81f02f9
Compare
|



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