summaryrefslogtreecommitdiff
path: root/archaeological_warehouse/tests.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2025-02-21 17:06:53 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2025-02-24 18:09:08 +0100
commitbc6cf94def73926e6f6bb986d61e5861a17584e2 (patch)
treeba4a7438cd6594c02938ad3211d523c6dd28a79f /archaeological_warehouse/tests.py
parent1b72554283f5c9e0644262a3f182409376870991 (diff)
downloadIshtar-bc6cf94def73926e6f6bb986d61e5861a17584e2.tar.bz2
Ishtar-bc6cf94def73926e6f6bb986d61e5861a17584e2.zip
✨ treatment state refactoring -> distinct input status and treatment status (refs #6182) - treatments: search criteria
Diffstat (limited to 'archaeological_warehouse/tests.py')
-rw-r--r--archaeological_warehouse/tests.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/archaeological_warehouse/tests.py b/archaeological_warehouse/tests.py
index d00156d90..896014c0d 100644
--- a/archaeological_warehouse/tests.py
+++ b/archaeological_warehouse/tests.py
@@ -41,9 +41,10 @@ from ishtar_common.tests import (
from ishtar_common.models import IshtarSiteProfile, ProfileType, UserProfile
from archaeological_operations.models import Operation
from archaeological_context_records.models import ContextRecord
-from archaeological_finds.models import \
- Find, MaterialType, Treatment, TreatmentType, FindTreatment, TreatmentState
-
+from archaeological_finds.models import (
+ Find, MaterialType, Treatment, TreatmentType, FindTreatment,
+ TreatmentStatus, TreatmentInputStatus
+)
from archaeological_warehouse import models, views, forms, serializers
from archaeological_operations.serializers import operation_serialization
@@ -947,13 +948,16 @@ class ContainerTest(FindInit, TestCase):
self.assertEqual(find.container_fisrt_full_location, full_localisation)
self.assertEqual(find.container_ref_fisrt_full_location, full_localisation)
- treat_state = TreatmentState.get_completed_state()
+ treat_input_status = TreatmentInputStatus.get_validated_state()
+ treat_status = TreatmentStatus.get_completed_state()
+
t = Treatment.objects.create(
container=container_2,
year=2024,
start_date=datetime.date(2024, 2, 29),
location=self.main_warehouse,
- treatment_state=treat_state
+ input_status=treat_input_status,
+ treatment_status=treat_status,
)
treat_type = TreatmentType.objects.get(txt_idx="packaging")
t.treatment_types.add(treat_type)