Unit test intervention forms
* adds unit test for new/edit intervention forms * improves code base for generating new identifiers
This commit is contained in:
@@ -9,6 +9,7 @@ import shutil
|
||||
|
||||
from django.urls import reverse
|
||||
|
||||
from compensation.settings import ECO_ACCOUNT_IDENTIFIER_TEMPLATE, ECO_ACCOUNT_IDENTIFIER_LENGTH
|
||||
from konova.utils.message_templates import DEDUCTION_REMOVED, DOCUMENT_REMOVED_TEMPLATE
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.core.validators import MinValueValidator
|
||||
@@ -52,6 +53,9 @@ class EcoAccount(AbstractCompensation, ShareableObjectMixin, RecordableObjectMix
|
||||
|
||||
objects = EcoAccountManager()
|
||||
|
||||
identifier_length = ECO_ACCOUNT_IDENTIFIER_LENGTH
|
||||
identifier_template = ECO_ACCOUNT_IDENTIFIER_TEMPLATE
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.identifier} ({self.title})"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user