summaryrefslogtreecommitdiff
path: root/archaeological_context_records/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_context_records/tests.py')
-rw-r--r--archaeological_context_records/tests.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/archaeological_context_records/tests.py b/archaeological_context_records/tests.py
index 4e98ec941..cabd6dcce 100644
--- a/archaeological_context_records/tests.py
+++ b/archaeological_context_records/tests.py
@@ -587,13 +587,18 @@ class ContextRecordQATest(ContextRecordInit, TestCase):
print(models.Unit.objects.all())
print(models.Operation.objects.all())
c.login(username=self.username, password=self.password)
- print(pks)
response = c.get(reverse("contextrecord-qa-bulk-update", args=[pks]))
print(response)
self.assertEqual(response.status_code, 200)
cr_1 = self.context_records[0]
cr_2 = self.context_records[1]
+
+ parcel = models.Parcel.objects.all().first()
+ operation = models.Operation.objects.all().first()
+ parcel.operation = operation
+ cr_1.operation = operation
+ cr_2.operation = operation
unit = models.Unit.objects.all().first()
sym_rel_type = models.RelationType.objects.create(
symmetrical=True, txt_idx="sym"
@@ -605,6 +610,7 @@ class ContextRecordQATest(ContextRecordInit, TestCase):
data = {
"qa_unit": unit.pk,
"qa_relation_type": sym_rel_type,
+ "qa_parcel": parcel.pk
}
response = c.post(reverse(
@@ -616,7 +622,8 @@ class ContextRecordQATest(ContextRecordInit, TestCase):
crs = models.ContextRecord.objects.all()
for cr in crs:
- self.assertEqual(cr.unit, su)
+ print(cr.unit)
+ self.assertEqual(cr.unit, unit)
class ContextRecordSearchTest(ContextRecordInit, TestCase, SearchText):