コード例 #1
0
def test_suite():
    from unittest import TestSuite, makeSuite
    suite = TestSuite()
    suite.addTest(makeSuite(TestCenterSecurity))
    suite.addTest(makeSuite(TestProjectSecurity))
    if ZopeTestCase.hasProduct('PloneHelpCenter'):
        suite.addTest(makeSuite(TestPloneHelpCenterIntegration))
    else:
        developer_warning("PloneHelpCenter integration tests ignored.")
    return suite
コード例 #2
0
def test_suite():
    from unittest import TestSuite, makeSuite
    suite = TestSuite()
    suite.addTest(makeSuite(TestCenterSecurity))
    suite.addTest(makeSuite(TestProjectSecurity))
    if ZopeTestCase.hasProduct('PloneHelpCenter'):
        suite.addTest(makeSuite(TestPloneHelpCenterIntegration))
    else:
        developer_warning("PloneHelpCenter integration tests ignored.")
    return suite
コード例 #3
0
def test_suite():
    from unittest import TestSuite, makeSuite
    suite = TestSuite()
    suite.addTest(makeSuite(TestProject))
    suite.addTest(makeSuite(TestProjectView))
    if ZopeTestCase.hasProduct('PloneHelpCenter'):
        suite.addTest(makeSuite(TestProjectWithPloneHelpCenterIntegration))
    else:
        developer_warning("PloneHelpCenter integration tests ignored.")
    #suite.addTest(makeSuite(TestProjectInternationalized))
    return suite
コード例 #4
0
ファイル: atse_testcase.py プロジェクト: a25kk/stv2
#
# PloneTestCase
#

# $Id: atse_testcase.py 23758 2006-05-19 14:10:53Z spamsch $

from Testing import ZopeTestCase
if ZopeTestCase.hasProduct('Five'):
    ZopeTestCase.installProduct('Five')
### ought to be refactored to use CMFTestCase
from Products.CMFPlone.tests import PloneTestCase
from Products.Archetypes.Extensions.utils import installTypes
from Products.Archetypes.public import listTypes
from Products.ATSchemaEditorNG.config import *

from StringIO import StringIO

ZopeTestCase.installProduct('ATSchemaEditorNG')
ZopeTestCase.installProduct('Archetypes')
ZopeTestCase.installProduct('MimetypesRegistry')
ZopeTestCase.installProduct('generator')
ZopeTestCase.installProduct('validation')
ZopeTestCase.installProduct('PortalTransforms')

def makeContent( container, portal_type, id='document', **kw ):
    container.invokeFactory( type_name=portal_type, id=id )
    return getattr( container, id )

class ATSETestCase( PloneTestCase.PloneTestCase ):
    '''TestCase for ATSchemaEditorNG testing'''
コード例 #5
0
ファイル: testPscIntegration.py プロジェクト: CGTIC/Plone_SP
def test_suite():
    from unittest import TestSuite, makeSuite
    suite = TestSuite()
    if ZopeTestCase.hasProduct('PloneSoftwareCenter'):
        suite.addTest(makeSuite(TestPscTracker))
    return suite
コード例 #6
0
ファイル: testPhoto.py プロジェクト: eaudeweb/naaya
#
# Tests interaction with Photo product
#

import os, sys
if __name__ == '__main__':
    execfile(os.path.join(sys.path[0], 'framework.py'))

from Testing import ZopeTestCase

have_photo = ZopeTestCase.hasProduct('Photo')

if have_photo:
    ZopeTestCase.installProduct('SiteAccess')
    ZopeTestCase.installProduct('ExtFile')
    ZopeTestCase.installProduct('Photo')

from Products.ExtFile.tests.ExtFileTestCase import ExtFileTestCase
from Products.ExtFile.tests.ExtFileTestCase import gifImage
from Products.ExtFile import ExtFile, Config
from Acquisition import aq_base

user_name = ZopeTestCase.user_name
photo_perms = ['Add Photos', 'Change Photos', 'Add Documents, Images, and Files']

import base64
auth_info = 'Basic %s' % base64.encodestring('%s:secret' % user_name)


class TestPhoto(ExtFileTestCase):
コード例 #7
0
def test_suite():
    from unittest import TestSuite, makeSuite
    suite = TestSuite()
    if ZopeTestCase.hasProduct('PloneSoftwareCenter'):
        suite.addTest(makeSuite(TestPscTracker))
    return suite