-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tracking pull request to merge release-2.4.0 to master (#2112)
* new 2.4.0 release * update pr number * Bump django from 3.2.17 to 3.2.18 in /backend Bumps [django](https://github.com/django/django) from 3.2.17 to 3.2.18. - [Release notes](https://github.com/django/django/releases) - [Commits](django/django@3.2.17...3.2.18) --- updated-dependencies: - dependency-name: django dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> * tfrs-2090-Refactor Schedule Summary Frontend Component * TFRS-2084- Added transaction ID to CT pages * TFRS-2104- Updated disclaimer for CR and ER * fix: django warning fixes * fix: jest tests fixed for new versions * chore: updated eslint config and fixes * fix: lint rule fix, reference fixes * TFRS-2012- Updated missing PropTypes * TFRS-2061- File Submission tab bugfix * update knps (#2139) * TFRS-2012- Fixed some minor warnings * increase clamav resource allocation (#2146) * unit test for schedulesummary container * updating description * Fixed original and current status * fixing dashboard filter * TFRS-2116- Fixed filters on compl & Exclu reports * updating exclusion report filter for dashboard * adding unit test for complianceReporting * Fixed misplaced code * chore: start of part3 summary tests * chore: moved part3 tests directory, cleanup * chore: style fixing * chore: lint fix * fix: unit tests and refactor schedule summary fixes * fix: fixed input handling on schedule summary * TFRS-2103 - Added new penalty for price of carbon * TFRS-2149 - Fixed Schedule D Validation Error * unit test for compliance report * removing logging * dashboard filter update * Minor fix * Fixed suppl reports not to be shown at dif filters --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: jig-patel <[email protected]> Co-authored-by: vibhishan <[email protected]> Co-authored-by: Alex Zorkin <[email protected]> Co-authored-by: AlexZorkin <[email protected]>
- Loading branch information
1 parent
fe82570
commit 25ea57f
Showing
130 changed files
with
18,270 additions
and
3,039 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Generated by Django 3.2.18 on 2023-03-12 08:23 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('api', '0202_create_user_login_history'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='scheduledsheetinput', | ||
name='description', | ||
field=models.CharField(blank=True, max_length=255, null=True), | ||
), | ||
migrations.AlterField( | ||
model_name='scheduledsheetinput', | ||
name='value', | ||
field=models.CharField(blank=True, max_length=255, null=True), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
from unittest import TestCase | ||
from decimal import Decimal | ||
from datetime import datetime | ||
from api.serializers.ComplianceReport import ComplianceReportDetailSerializer | ||
from unittest.mock import MagicMock, Mock | ||
|
||
|
||
class TestComplianceReportDetailSerializer(TestCase): | ||
def setUp(self): | ||
self.serializer = ComplianceReportDetailSerializer() | ||
self.serializer.summary = None | ||
|
||
self.serializer.schedule_a = MagicMock( | ||
net_gasoline_class_transferred=Decimal('10'), | ||
net_diesel_class_transferred=Decimal('20') | ||
) | ||
self.serializer.schedule_b = MagicMock( | ||
total_petroleum_diesel=Decimal('30'), | ||
total_petroleum_gasoline=Decimal('40'), | ||
total_renewable_diesel=Decimal('50'), | ||
total_renewable_gasoline=Decimal('60'), | ||
total_credits=Decimal('70'), | ||
total_debits=Decimal('80') | ||
) | ||
self.serializer.schedule_c = MagicMock( | ||
total_petroleum_diesel=Decimal('90'), | ||
total_petroleum_gasoline=Decimal('100'), | ||
total_renewable_diesel=Decimal('110'), | ||
total_renewable_gasoline=Decimal('120') | ||
) | ||
|
||
def test_get_summary_for_year_lt_2023(self): | ||
self.serializer.create_timestamp = Mock(year=2022) | ||
result = self.serializer.get_summary(self.serializer)['total_payable'] | ||
self.assertEqual(result, Decimal('2000.00')) | ||
|
||
def test_get_summary_for_year_gt_2022(self): | ||
self.serializer.create_timestamp = Mock(year=2023) | ||
result = self.serializer.get_summary(self.serializer)['total_payable'] | ||
self.assertEqual(result, Decimal('6000.00')) |
Oops, something went wrong.