diff options
author | Cefin <kevon@tuta.io> | 2022-03-11 17:24:27 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2022-07-08 09:58:49 +0200 |
commit | f053335d247feaec35ce09996ba9518a7bb082d6 (patch) | |
tree | 007c4a8cd50adcd01100caaf629e37012c73e0e1 /archaeological_context_records/tests.py | |
parent | f78ccc00a7139700155e55aef0f12460f6d7b192 (diff) | |
download | Ishtar-f053335d247feaec35ce09996ba9518a7bb082d6.tar.bz2 Ishtar-f053335d247feaec35ce09996ba9518a7bb082d6.zip |
Context Record, Bulk update : draft two of tests #5293
Diffstat (limited to 'archaeological_context_records/tests.py')
-rw-r--r-- | archaeological_context_records/tests.py | 11 |
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): |