icsemantic.catalog.tests.test_functional

Package platecom :: Package ontocatalog :: Package tests :: Module test_functional |
[hide private]
[frames] | no frames]

# Source Code for Module icsemantic.catalog.tests.test_functional

     1  """Functional tests for OntoCatalog.
     2  """
     3
     4  import unittest
     5  import doctest
     6
     7  from zope.testing import doctestunit
     8  from zope.component import testing
     9  from Testing import ZopeTestCase as ztc
    10
    11  from Products.Five import zcml
    12  from Products.Five import fiveconfigure
    13  from Products.PloneTestCase.layer import PloneSite
    14
    15  from platecom.ontocatalog.config import *
    16  import base
    17
    18 -def test_suite():
    19      return unittest.TestSuite([
    20
    21          # Test the SearchableSynonymousText index in collections
    22          ztc.ZopeDocFileSuite(
    23              'tests/synonymous_criterion.txt', package=PACKAGENAME,
    24              test_class=base.OntoCatalogFunctionalTestCase,
    25              optionflags=doctest.REPORT_ONLY_FIRST_FAILURE | doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS),
    26
    27          # Test the SearchableTranslatedText index in collections
    28          ztc.ZopeDocFileSuite(
    29              'tests/translated_criterion.txt', package=PACKAGENAME,
    30              test_class=base.OntoCatalogFunctionalTestCase,
    31              optionflags=doctest.REPORT_ONLY_FIRST_FAILURE | doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS),
    32
    33          # Test the SearchableRelatedText index in collections
    34          ztc.ZopeDocFileSuite(
    35              'tests/related_criterion.txt', package=PACKAGENAME,
    36              test_class=base.OntoCatalogFunctionalTestCase,
    37              optionflags=doctest.REPORT_ONLY_FIRST_FAILURE | doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS),
    38
    39          # Test the custom advance search form
    40          ztc.ZopeDocFileSuite(
    41              'tests/advanced_search.txt', package=PACKAGENAME,
    42              test_class=base.OntoCatalogFunctionalTestCase,
    43              optionflags=doctest.REPORT_ONLY_FIRST_FAILURE | doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS),
    44          ])
    45
    46  if __name__ == '__main__':
    47      unittest.main(defaultTest='test_suite')
    48