From 9c5c437483a41809c94f23274bdaf574e059b6fa Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 18 Mar 2021 11:00:24 +0100 Subject: Fix pined search for finds - fix tests --- archaeological_context_records/tests.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'archaeological_context_records/tests.py') diff --git a/archaeological_context_records/tests.py b/archaeological_context_records/tests.py index cf117285d..fef557cf3 100644 --- a/archaeological_context_records/tests.py +++ b/archaeological_context_records/tests.py @@ -496,10 +496,12 @@ class ContextRecordTest(ContextRecordInit, TestCase): profile.contextrecord_custom_index = 'operation_id' profile.save() cr1 = self.context_records[0] + cr1 = models.ContextRecord.objects.get(pk=cr1.pk) cr1.save() cr1 = models.ContextRecord.objects.get(pk=cr1.pk) self.assertEqual(cr1.custom_index, 1) cr2 = self.context_records[1] + cr2 = models.ContextRecord.objects.get(pk=cr2.pk) cr2.operation = cr1.operation cr2.save() cr2 = models.ContextRecord.objects.get(pk=cr2.pk) @@ -664,7 +666,9 @@ class ContextRecordSearchTest(ContextRecordInit, TestCase, SearchText): 2) # export response = c.get(reverse('get-contextrecord-full', - kwargs={'type': 'csv'}), {'submited': '1'}) + kwargs={'type': 'csv'}), + {'submited': '1', + 'operation__year': 2010, rel_key: rel_ope.label}) ENCODING = settings.ENCODING or 'utf-8' content = response.content.decode(ENCODING) # 2 lines + header -- cgit v1.2.3