-
Notifications
You must be signed in to change notification settings - Fork 0
MPT-12842 Add commerce requests #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you clarify reasons to change import-mode?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.