@@ -16,7 +16,7 @@ from django.test import TestCase, Client
|
||||
from django.urls import reverse
|
||||
|
||||
from codelist.models import KonovaCode
|
||||
from compensation.models import Compensation, CompensationState, CompensationAction, EcoAccount
|
||||
from compensation.models import Compensation, CompensationState, CompensationAction, EcoAccount, EcoAccountDeduction
|
||||
from intervention.models import Legal, Responsibility, Intervention
|
||||
from konova.management.commands.setup_data import GROUPS_DATA
|
||||
from konova.models import Geometry
|
||||
@@ -54,6 +54,7 @@ class BaseTestCase(TestCase):
|
||||
cls.compensation = cls.create_dummy_compensation()
|
||||
cls.eco_account = cls.create_dummy_eco_account()
|
||||
cls.ema = cls.create_dummy_ema()
|
||||
cls.deduction = cls.create_dummy_deduction()
|
||||
cls.create_dummy_states()
|
||||
cls.create_dummy_action()
|
||||
cls.codes = cls.create_dummy_codes()
|
||||
@@ -194,6 +195,14 @@ class BaseTestCase(TestCase):
|
||||
)
|
||||
return ema
|
||||
|
||||
@classmethod
|
||||
def create_dummy_deduction(cls):
|
||||
return EcoAccountDeduction.objects.create(
|
||||
account=cls.create_dummy_eco_account(),
|
||||
intervention=cls.create_dummy_intervention(),
|
||||
surface=100,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def create_dummy_states(cls):
|
||||
""" Creates an intervention which can be used for tests
|
||||
|
||||
Reference in New Issue
Block a user