Unit test analysis

* adds unit test for creating report
* fixes bug where new (>2018) eco accounts have not been fetched correctly from the  db
* adds enhancements in the frontend
* improves test data setup
This commit is contained in:
mpeltriaux committed 2023-08-17 10:12:05 +02:00
1 parent 345b266422
commit d9cf9669f0
15 files changed
+211 -32

No files matched your search

+3 -2
View File
@@ -413,6 +413,7 @@ class TimespanReport:
def __init__(self, id: str, date_from: str, date_to: str):
# First fetch all eco account for this office
self.queryset = EcoAccount.objects.filter(
legal__registration_date__gt=LKOMPVZVO_PUBLISH_DATE,
responsible__conservation_office__id=id,
deleted=None,
created__timestamp__date__gte=date_from,
@@ -516,8 +517,8 @@ class TimespanReport:
legal__registration_date__lte=LKOMPVZVO_PUBLISH_DATE,
responsible__conservation_office__id=id,
deleted=None,
created__timestamp__gte=date_from,
created__timestamp__lte=date_to,
created__timestamp__date__gte=date_from,
created__timestamp__date__lte=date_to,
)
self.queryset_acc_recorded = self.queryset_acc.filter(
recorded__isnull=False,