Unit test intervention forms

* adds unit test for new/edit intervention forms
* improves code base for generating new identifiers
This commit is contained in:
2023-08-24 11:47:40 +02:00
parent 02e8d65f02
commit 7430a239a5
7 changed files with 153 additions and 29 deletions

View File

@@ -14,7 +14,7 @@ from django.urls import reverse
from django.utils import timezone
from analysis.settings import LKOMPVZVO_PUBLISH_DATE
from compensation.models import EcoAccountDeduction
from intervention.settings import INTERVENTION_IDENTIFIER_LENGTH, INTERVENTION_IDENTIFIER_TEMPLATE
from intervention.tasks import celery_export_to_egon
from user.models import User
from django.db import models, transaction
@@ -61,6 +61,9 @@ class Intervention(BaseObject,
objects = InterventionManager()
identifier_length = INTERVENTION_IDENTIFIER_LENGTH
identifier_template = INTERVENTION_IDENTIFIER_TEMPLATE
def __str__(self):
return f"{self.identifier} ({self.title})"