Conversation
| testpaths = "tests" | ||
| pythonpath = "." | ||
| addopts = "--cov=mpt_api_client --cov-report=term-missing --cov-report=html --cov-report=xml" | ||
| addopts = "--cov=mpt_api_client --cov-report=term-missing --cov-report=html --cov-report=xml --import-mode=importlib" |
There was a problem hiding this comment.
Could you clarify reasons to change import-mode?
There was a problem hiding this comment.
With the current setup, you can't have tests files with the same name.
import file mismatch:
imported module 'test_mixins' has this __file__ attribute:
/mpt_api_client/tests/http/test_mixins.py
which is not the same as the test file we want to collect:
/mpt_api_client/tests/resources/commerce/test_mixins.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
According to copilot, adding this is one way of solving that issue. If you have a preference for another way just let me know.
| from mpt_api_client.models import ResourceData | ||
|
|
||
|
|
||
| class ValidateMixin[BaseModel]: |
There was a problem hiding this comment.
One question... Do you really need all of the these action-based mixins here? I mean, it make sense when you are trying to share some functionality, like update/create/etc. But for specific actions for orders - what's the reason to have it as mixin per cada action?
There was a problem hiding this comment.
Orders and Requests have the same actions.
Orders: "get", "create", "update", "delete", "validate", "process", "query", "complete", "fail" and "template"
Requests: "get", "create", "update", "delete", "validate", "process", "query", "complete" and "template" (missing fail)
7ae875d to
f6eead4
Compare
|



No description provided.