diff options
Diffstat (limited to 'archaeological_operations/tests.py')
-rw-r--r-- | archaeological_operations/tests.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py index f50e58eaa..a3cd5fd8d 100644 --- a/archaeological_operations/tests.py +++ b/archaeological_operations/tests.py @@ -43,7 +43,7 @@ from ishtar_common.models import OrganizationType, Organization, ItemKey, \ Town, ImporterColumn, Person, Author, SourceType, AuthorType, \ DocumentTemplate, PersonType, TargetKeyGroup, JsonDataField, \ JsonDataSection, ImportTarget, FormaterType, CustomForm, ExcludedField, \ - UserProfile, ProfileType, Area, CustomFormJsonField + UserProfile, ProfileType, Area, CustomFormJsonField, get_current_profile from archaeological_files.models import File, FileType from archaeological_context_records.models import Unit, ContextRecord @@ -1103,8 +1103,10 @@ class OperationTest(TestCase, OperationInitTest): # verify the relevance of the update cr = ContextRecord.objects.get(pk=cr.pk) ope_id, parcel_sec, parcel_nb, cr_label = cr.cached_label.split(' | ') - self.assertEqual(ope_id, '{}2011-1'.format( - settings.ISHTAR_DEF_OPE_PREFIX)) + profile = get_current_profile() + + self.assertEqual( + ope_id, '{}2011-1'.format(profile.default_operation_prefix)) base_find = BaseFind.objects.get(pk=base_find.pk) op_code, idx = base_find.cache_short_id.split(' | ') @@ -1126,7 +1128,8 @@ class OperationTest(TestCase, OperationInitTest): operation.save() cr = ContextRecord.objects.get(pk=cr.pk) ope_id, parcel_sec, parcel_nb, cr_label = cr.cached_label.split(' | ') - self.assertEqual(ope_id, '{}666'.format(settings.ISHTAR_OPE_PREFIX)) + + self.assertEqual(ope_id, '{}666'.format(profile.operation_prefix)) base_find = BaseFind.objects.get(pk=base_find.pk) op_code, idx = base_find.cache_short_id.split(' | ') |