unit tests: move creation of externalIdentifier index to general setup
This commit is contained in:
parent
181846b29a
commit
7dcf4a9f4e
2 changed files with 4 additions and 4 deletions
|
@ -1,7 +1,5 @@
|
||||||
"""
|
"""
|
||||||
Set up a loops site for testing.
|
Set up a loops site for testing.
|
||||||
|
|
||||||
$Id$
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
@ -43,8 +41,8 @@ class TestSite(BaseTestSite):
|
||||||
component.provideUtility(fullPathStorage(), IExternalStorage, name='fullpath')
|
component.provideUtility(fullPathStorage(), IExternalStorage, name='fullpath')
|
||||||
|
|
||||||
catalog = component.getUtility(ICatalog)
|
catalog = component.getUtility(ICatalog)
|
||||||
catalog['loops_externalidentifier'] = FieldIndex('externalIdentifier',
|
#catalog['loops_externalidentifier'] = FieldIndex('externalIdentifier',
|
||||||
IExternalSourceInfo, False)
|
# IExternalSourceInfo, False)
|
||||||
|
|
||||||
tType = concepts.getTypeConcept()
|
tType = concepts.getTypeConcept()
|
||||||
tExtFile = addAndConfigureObject(concepts, Concept, 'extfile',
|
tExtFile = addAndConfigureObject(concepts, Concept, 'extfile',
|
||||||
|
|
|
@ -192,6 +192,8 @@ class TestSite(object):
|
||||||
component.provideUtility(catalog, ICatalog)
|
component.provideUtility(catalog, ICatalog)
|
||||||
catalog['loops_title'] = TextIndex('title', IIndexAttributes, True)
|
catalog['loops_title'] = TextIndex('title', IIndexAttributes, True)
|
||||||
catalog['loops_text'] = TextIndex('text', IIndexAttributes, True)
|
catalog['loops_text'] = TextIndex('text', IIndexAttributes, True)
|
||||||
|
catalog['loops_externalidentifier'] = FieldIndex(
|
||||||
|
'externalIdentifier', IIndexAttributes, False)
|
||||||
catalog['loops_identifier'] = FieldIndex('identifier', IIndexAttributes, True)
|
catalog['loops_identifier'] = FieldIndex('identifier', IIndexAttributes, True)
|
||||||
catalog['loops_type'] = FieldIndex('tokenForSearch', IType, False)
|
catalog['loops_type'] = FieldIndex('tokenForSearch', IType, False)
|
||||||
catalog['loops_keywords'] = KeywordIndex('keywords', IIndexAttributes, True)
|
catalog['loops_keywords'] = KeywordIndex('keywords', IIndexAttributes, True)
|
||||||
|
|
Loading…
Add table
Reference in a new issue