From fe78f0db71ac7a9528925492c8521496dc6c36ed Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 16 Aug 2018 12:38:41 +0200 Subject: Manage ope prefixes with the profile --- archaeological_context_records/tests.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'archaeological_context_records/tests.py') diff --git a/archaeological_context_records/tests.py b/archaeological_context_records/tests.py index bf8864d56..2f676c194 100644 --- a/archaeological_context_records/tests.py +++ b/archaeological_context_records/tests.py @@ -28,7 +28,7 @@ from django.core.urlresolvers import reverse from django.test.client import Client from ishtar_common.models import IshtarSiteProfile, ImporterModel, \ - UserProfile, ProfileType, Town, Area + UserProfile, ProfileType, Town, Area, get_current_profile from archaeological_operations.tests import OperationInitTest, \ ImportTest, FILE_TOWNS_FIXTURES, FILE_FIXTURES, OPERATION_TOWNS_FIXTURES @@ -293,7 +293,9 @@ class ContextRecordTest(ContextRecordInit, TestCase): cr.operation.code_patriarche = "PATRIARCHE" cr.operation.save() cr = models.ContextRecord.objects.get(pk=cr.pk) - self.assertIn(settings.ISHTAR_OPE_PREFIX.lower() + "patriarch", + + profile = get_current_profile() + self.assertIn(profile.operation_prefix.lower() + "patriarch", cr.search_vector) def test_upstream_cache_update(self): -- cgit v1.2.3