-
Notifications
You must be signed in to change notification settings - Fork 6
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
[IMP] sustainability: validity date tests #244
base: 17.0
Are you sure you want to change the base?
Conversation
…d invoice creation in tests Enhance the test setup by adding more carbon factors, values, and types. Introduce a new product, account, and invoice creation to simulate real-world scenarios. This improves test coverage and ensures robustness in handling various carbon factor configurations and related entities.
Move carbon factor and related setup from common.py to test_conversion.py to streamline test setup and improve maintainability. This change reduces redundancy and ensures that test data is only initialized where necessary, enhancing the clarity and focus of the test suite.
Add creation of a carbon factor value with a specific date and value to ensure the default fallback factor has an associated value. This enhances test coverage by verifying the behavior of carbon factor values in the system.
Add `test_carbon_computation.py` to verify carbon factor values are correctly applied based on invoice dates. This ensures the system accurately computes carbon values for both matching and earlier invoice dates, enhancing reliability in sustainability calculations.
Hi @BonnetAdam, @jguenat, |
@@ -8,13 +8,18 @@ class CarbonCommon(TransactionCase): | |||
def setUpClass(cls): | |||
super().setUpClass() | |||
|
|||
# Disable tracking test suite | |||
cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True)) |
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.
you can directly add the no_reset_password=True to this context
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 with_context
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.
why not making a code suggestion directly, while explaining why you want this change?
… category setup to streamline test setup and improve maintainability
Related Issues