Refactoring
* renames model ResponsibilityData into Responsibility * renames model LegalData into Legal * moves form->object saving logic into model * refactors NewDocumentForm into special types for intervention, compensation, eco account and ema *
This commit is contained in:
@@ -15,7 +15,7 @@ from django.urls import reverse
|
||||
|
||||
from codelist.models import KonovaCode
|
||||
from compensation.models import Compensation, CompensationState, CompensationAction, EcoAccount
|
||||
from intervention.models import LegalData, ResponsibilityData, Intervention
|
||||
from intervention.models import Legal, Responsibility, Intervention
|
||||
from konova.management.commands.setup_data import GROUPS_DATA
|
||||
from konova.models import Geometry
|
||||
from konova.settings import DEFAULT_GROUP
|
||||
@@ -103,9 +103,9 @@ class BaseTestCase(TestCase):
|
||||
action=UserAction.CREATED,
|
||||
)
|
||||
# Create legal data object (without M2M laws first)
|
||||
legal_data = LegalData.objects.create()
|
||||
legal_data = Legal.objects.create()
|
||||
# Create responsible data object
|
||||
responsibility_data = ResponsibilityData.objects.create()
|
||||
responsibility_data = Responsibility.objects.create()
|
||||
geometry = Geometry.objects.create()
|
||||
# Finally create main object, holding the other objects
|
||||
intervention = Intervention.objects.create(
|
||||
@@ -162,8 +162,8 @@ class BaseTestCase(TestCase):
|
||||
)
|
||||
geometry = Geometry.objects.create()
|
||||
# Create responsible data object
|
||||
lega_data = LegalData.objects.create()
|
||||
responsible_data = ResponsibilityData.objects.create()
|
||||
lega_data = Legal.objects.create()
|
||||
responsible_data = Responsibility.objects.create()
|
||||
# Finally create main object, holding the other objects
|
||||
eco_account = EcoAccount.objects.create(
|
||||
identifier="TEST",
|
||||
|
||||
Reference in New Issue
Block a user