summaryrefslogtreecommitdiff
path: root/archaeological_operations/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_operations/tests.py')
-rw-r--r--archaeological_operations/tests.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py
index 1480eb502..f67ce5adc 100644
--- a/archaeological_operations/tests.py
+++ b/archaeological_operations/tests.py
@@ -1585,6 +1585,13 @@ class OperationSearchTest(TestCase, OperationInitTest):
result = json.loads(response.content)
self.assertEqual(result['recordsTotal'], 3)
+ # open search '*'
+ search = {'search_vector': u'{}="{}*"'.format(search_q, neo.label[:3])}
+ response = c.get(reverse('get-operation'), search)
+ self.assertEqual(response.status_code, 200)
+ result = json.loads(response.content)
+ self.assertEqual(result['recordsTotal'], 2)
+
# non hierarchic search
search_q = unicode(
pgettext("key for text search (no accent, no spaces)", u"remain")
@@ -1595,7 +1602,6 @@ class OperationSearchTest(TestCase, OperationInitTest):
result = json.loads(response.content)
self.assertEqual(result['recordsTotal'], 1)
-
def create_relations(self):
rel1 = models.RelationType.objects.create(
symmetrical=True, label='Include', txt_idx='include')