MPT-16437 Reorganise resource catalog mixins structure#203
Conversation
📝 WalkthroughWalkthroughSplits composite catalog mixins into separate modules (activatable, document, media), re-exports all mixins from Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@tests/unit/resources/catalog/mixins/test_publishable_mixin.py`:
- Around line 73-102: Remove the unused input_status parameter from the
parametrization and the test signature in test_custom_resource_actions_no_data:
update the `@pytest.mark.parametrize` tuple to only include ("action",) and change
the function definition to def
test_custom_resource_actions_no_data(publishable_service, action): so the unused
input_status is not passed into the test; apply the same edit to the other
analogous no-data test in this module that was similarly parametrized (the other
test covering the publish/review/unpublish actions).
7d8f7b5 to
53468a5
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@tests/unit/resources/catalog/mixins/test_publishable_mixin.py`:
- Around line 135-145: Remove the unused `input_status` parameter from the async
no-data test: update the pytest.mark.parametrize tuple on
`test_async_custom_resource_actions_no_data` to only pass the "action" values
and remove `input_status` from the test function signature (leave
`async_publishable_service` and `action`), ensuring the parametrize decorator
and the test function signature match.
🧹 Nitpick comments (3)
mpt_api_client/resources/catalog/mixins/__init__.py (1)
18-18: Remove unusednoqadirective.Ruff flags
WPS410as unknown. Since the linting configuration was updated in this PR (per pyproject.toml changes), this directive is no longer needed.🔧 Proposed fix
-__all__ = [ # noqa: WPS410 +__all__ = [tests/unit/resources/catalog/mixins/test_document_mixin.py (2)
77-77: Remove unusednoqadirective.Ruff flags
WPS210as unknown; this directive has no effect.🔧 Proposed fix
-def test_document_create_with_file(document_service): # noqa: WPS210 +def test_document_create_with_file(document_service):
135-135: Remove unusednoqadirective.Ruff flags
WPS210as unknown; this directive has no effect.🔧 Proposed fix
-async def test_async_document_create_with_file(async_document_service): # noqa: WPS210 +async def test_async_document_create_with_file(async_document_service):
53468a5 to
f9bdf14
Compare
|



Closes MPT-16437