summaryrefslogtreecommitdiff
path: root/archaeological_context_records
diff options
context:
space:
mode:
authorCefin <kevon@tuta.io>2022-03-11 17:24:27 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2022-07-08 09:58:49 +0200
commit40026726b089465b45912edf32ff3fe9364a65a6 (patch)
tree007c4a8cd50adcd01100caaf629e37012c73e0e1 /archaeological_context_records
parentfe18d56a4b33e275b85d1bccdd4ddf738e6b2a59 (diff)
downloadIshtar-40026726b089465b45912edf32ff3fe9364a65a6.tar.bz2
Ishtar-40026726b089465b45912edf32ff3fe9364a65a6.zip
Context Record, Bulk update : draft two of tests #5293
Diffstat (limited to 'archaeological_context_records')
-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):