Ejemplo n.º 1
0
def test_suite():
    import unittest
    from Testing.ZopeTestCase import FunctionalDocFileSuite
    suite = unittest.TestSuite()
    suite.addTest(FunctionalDocFileSuite('doc/README.txt',
                                         package='Products.Marshall',
                                         test_class=DocumentationTest))

    ## XXX: reenable Blob and Image tests
    #suite.addTest(unittest.makeSuite(ATXMLReferenceMarshallTest))
    #suite.addTest(unittest.makeSuite(BlobMarshallTest))
    dirs = glob.glob(os.path.join(PACKAGE_HOME, 'input', '*'))
    comps = [i['name'] for i in getRegisteredComponents()]
    for d in dirs:
        prefix = os.path.basename(d)
        if prefix not in comps:
            continue
        files = glob.glob(os.path.join(d, '*'))
        for f in files:
            if os.path.isdir(f):
                continue
            f_name = os.path.basename(f)
            type_name = os.path.splitext(f_name)[0]
            k_dict = {'prefix':prefix,
                      'type_name':type_name,
                      'input':f}
            klass = type('%s%sTest' % (prefix, type_name),
                         (MarshallerTest,),
                         k_dict)
            suite.addTest(unittest.makeSuite(klass))
    return suite
Ejemplo n.º 2
0
 def setComponentName(self, component_name):
     """ Change the component name """
     valid_components = [i['name'] for i in getRegisteredComponents()]
     if component_name not in valid_components:
         raise ValueError('Not a valid registered '
                          'component: %s' % component_name)
     self._component_name = component_name
Ejemplo n.º 3
0
 def setComponentName(self, component_name):
     """ Change the component name """
     valid_components = [i['name'] for i in getRegisteredComponents()]
     if component_name not in valid_components:
         raise ValueError('Not a valid registered '
                          'component: %s' % component_name)
     self._component_name = component_name
Ejemplo n.º 4
0
def test_suite():
    import unittest

    suite = unittest.TestSuite()
    dirs = glob.glob(os.path.join(PACKAGE_HOME, "export", "*"))
    comps = [i["name"] for i in getRegisteredComponents()]
    for d in dirs:
        prefix = os.path.basename(d)
        if prefix not in comps:
            continue
        k_dict = {"base": d, "prefix": prefix}
        klass = type("%sExportTest" % prefix, (ExportTest,), k_dict)
        suite.addTest(unittest.makeSuite(klass))
    return suite
Ejemplo n.º 5
0
def test_suite():
    import unittest
    suite = unittest.TestSuite()
    dirs = glob.glob(os.path.join(PACKAGE_HOME, 'export', '*'))
    comps = [i['name'] for i in getRegisteredComponents()]
    for d in dirs:
        prefix = os.path.basename(d)
        if prefix not in comps:
            continue
        k_dict = {'base':d,
                  'prefix':prefix}
        klass = type('%sExportTest' % prefix,
                     (ExportTest,),
                     k_dict)
        suite.addTest(unittest.makeSuite(klass))
    return suite
Ejemplo n.º 6
0
def test_suite():
    import unittest
    suite = unittest.TestSuite()
    dirs = glob.glob(os.path.join(PACKAGE_HOME, 'export', '*'))
    comps = [i['name'] for i in getRegisteredComponents()]
    for d in dirs:
        prefix = os.path.basename(d)
        if prefix not in comps:
            continue
        k_dict = {'base':d,
                  'prefix':prefix}
        klass = type('%sExportTest' % prefix,
                     (ExportTest,),
                     k_dict)
        suite.addTest(unittest.makeSuite(klass))
    return suite
Ejemplo n.º 7
0
def manage_availableComponents(self):
    return getRegisteredComponents()
Ejemplo n.º 8
0
def manage_availableComponents(self):
    return getRegisteredComponents()