Exemple #1
0
 def testSetUp(self):
     BIntegrationTesting.testSetUp(self)
     transaction.commit()
     LayerMixin.testSetUp(self)
     transaction.commit()
Exemple #2
0
from plone.testing import z2

import collective.formbuilder


class CollectiveFormbuilderLayer(PloneSandboxLayer):

    defaultBases = (PLONE_APP_CONTENTTYPES_FIXTURE, )

    def setUpZope(self, app, configurationContext):
        self.loadZCML(package=collective.formbuilder)

    def setUpPloneSite(self, portal):
        applyProfile(portal, 'collective.formbuilder:default')


COLLECTIVE_FORMBUILDER_FIXTURE = CollectiveFormbuilderLayer()

COLLECTIVE_FORMBUILDER_INTEGRATION_TESTING = IntegrationTesting(
    bases=(COLLECTIVE_FORMBUILDER_FIXTURE, ),
    name='CollectiveFormbuilderLayer:IntegrationTesting')

COLLECTIVE_FORMBUILDER_FUNCTIONAL_TESTING = FunctionalTesting(
    bases=(COLLECTIVE_FORMBUILDER_FIXTURE, ),
    name='CollectiveFormbuilderLayer:FunctionalTesting')

COLLECTIVE_FORMBUILDER_ACCEPTANCE_TESTING = FunctionalTesting(
    bases=(COLLECTIVE_FORMBUILDER_FIXTURE, REMOTE_LIBRARY_BUNDLE_FIXTURE,
           z2.ZSERVER_FIXTURE),
    name='CollectiveFormbuilderLayer:AcceptanceTesting')
Exemple #3
0
from plone.app.testing import PloneSandboxLayer
from plone.app.testing import PLONE_FIXTURE
from plone.app.testing import IntegrationTesting
from plone.app.testing import FunctionalTesting


class Fixture(PloneSandboxLayer):

    defaultBases = (PLONE_FIXTURE, )

    def setUpZope(self, app, configurationContext):
        # Load ZCML
        import telesur.contenttypes
        self.loadZCML(package=telesur.contenttypes)

    def setUpPloneSite(self, portal):
        # Install into Plone site using portal_setup
        self.applyProfile(portal, 'telesur.contenttypes:default')


FIXTURE = Fixture()
INTEGRATION_TESTING = IntegrationTesting(
    bases=(FIXTURE, ),
    name='telesur.contenttypes:Integration',
)
FUNCTIONAL_TESTING = FunctionalTesting(
    bases=(FIXTURE, ),
    name='telesur.contenttypes:Functional',
)
Exemple #4
0
from plone.app.testing import PloneSandboxLayer
from plone.app.testing import PLONE_FIXTURE
from plone.app.testing import IntegrationTesting
from plone.app.testing import FunctionalTesting


class Fixture(PloneSandboxLayer):

    defaultBases = (PLONE_FIXTURE, )

    def setUpZope(self, app, configurationContext):
        # Load ZCML
        import tlspu.cookiepolicy
        self.loadZCML(package=tlspu.cookiepolicy)

    def setUpPloneSite(self, portal):
        # Install into Plone site using portal_setup
        self.applyProfile(portal, 'tlspu.cookiepolicy:default')


FIXTURE = Fixture()
INTEGRATION_TESTING = IntegrationTesting(
    bases=(FIXTURE, ),
    name='tlspu.cookiepolicy:Integration',
)
FUNCTIONAL_TESTING = FunctionalTesting(
    bases=(FIXTURE, ),
    name='tlspu.cookiepolicy:Functional',
)
Exemple #5
0
from plone.app.testing import PloneWithPackageLayer
from plone.app.testing import IntegrationTesting
from plone.app.testing import FunctionalTesting

import collective.viewlet.pythonscript

COLLECTIVE_VIEWLET_PYTHONSCRIPT = PloneWithPackageLayer(
    zcml_package=collective.viewlet.pythonscript,
    zcml_filename='testing.zcml',
    gs_profile_id='collective.viewlet.pythonscript:testing',
    name="COLLECTIVE_VIEWLET_PYTHONSCRIPT")

COLLECTIVE_VIEWLET_PYTHONSCRIPT_INTEGRATION = IntegrationTesting(
    bases=(COLLECTIVE_VIEWLET_PYTHONSCRIPT, ),
    name="COLLECTIVE_VIEWLET_PYTHONSCRIPT_INTEGRATION")

COLLECTIVE_VIEWLET_PYTHONSCRIPT_FUNCTIONAL = FunctionalTesting(
    bases=(COLLECTIVE_VIEWLET_PYTHONSCRIPT, ),
    name="COLLECTIVE_VIEWLET_PYTHONSCRIPT_FUNCTIONAL")
Exemple #6
0
    defaultBases = (PLONE_FIXTURE, )

    def setUpZope(self, app, configurationContext):
        import plone.app.layout
        import plone.app.contentlisting
        xmlconfig.file('configure.zcml',
                       plone.app.layout,
                       context=configurationContext)
        xmlconfig.file('configure.zcml',
                       plone.app.contentlisting,
                       context=configurationContext)


CONTENTLISTING_FIXTURE = ContentListingLayer()
CONTENTLISTING_INTEGRATION_TESTING = IntegrationTesting(
    bases=(CONTENTLISTING_FIXTURE, ), name="ContentListing:Integration")
CONTENTLISTING_FUNCTIONAL_TESTING = FunctionalTesting(
    bases=(CONTENTLISTING_FIXTURE, ), name="ContentListing:Functional")


class ContentlistingTestCase(unittest.TestCase):
    layer = CONTENTLISTING_INTEGRATION_TESTING

    def setUp(self):
        self.portal = self.layer['portal']

        setRoles(self.portal, TEST_USER_ID, ['Manager'])
        wftool = getToolByName(self.portal, 'portal_workflow')
        wftool.setDefaultChain('simple_publication_workflow')

        self.portal.invokeFactory('Folder', 'test-folder')
Exemple #7
0
        # Likewise:
        import eke.study
        self.loadZCML(package=eke.study)
        z2.installProduct(app, 'eke.study')
        # Likewise:
        import eke.ecas
        self.loadZCML(package=eke.ecas)
        z2.installProduct(app, 'eke.ecas')

        import eke.biomarker.tests.base
        eke.biomarker.tests.base.registerLocalTestData()

    def setUpPloneSite(self, portal):
        self.applyProfile(portal, 'eke.biomarker:default')
        wfTool = getToolByName(portal, 'portal_workflow')
        wfTool.setDefaultChain('plone_workflow')

    def tearDownZope(self, app):
        z2.uninstallProduct(app, 'eke.biomarker')


EKE_BIOMARKER_FIXTURE = EKEBiomarker()
EKE_BIOMARKER_INTEGRATION_TESTING = IntegrationTesting(
    bases=(EKE_BIOMARKER_FIXTURE, ),
    name='EKEBiomarker:Integration',
)
EKE_BIOMARKER_FUNCTIONAL_TESTING = FunctionalTesting(
    bases=(EKE_BIOMARKER_FIXTURE, ),
    name='EKEBiomarker:Functional',
)
from plone.app.testing import PloneSandboxLayer
from plone.app.testing import PLONE_FIXTURE
from plone.app.testing import IntegrationTesting
from plone.app.testing import FunctionalTesting


class Fixture(PloneSandboxLayer):

    defaultBases = (PLONE_FIXTURE, )

    def setUpZope(self, app, configurationContext):
        # Load ZCML
        import collective.formwidget.relationfield
        self.loadZCML(package=collective.formwidget.relationfield)

    def setUpPloneSite(self, portal):
        # Install into Plone site using portal_setup
        self.applyProfile(portal,
                          'collective.formwidget.relationfield:default')


FIXTURE = Fixture()
INTEGRATION_TESTING = IntegrationTesting(
    bases=(FIXTURE, ),
    name='collective.formwidget.relationfield:Integration',
)
FUNCTIONAL_TESTING = FunctionalTesting(
    bases=(FIXTURE, ),
    name='collective.formwidget.relationfield:Functional',
)
Exemple #9
0
from plone.app.testing import PLONE_FIXTURE
from plone.app.testing import PloneSandboxLayer
from plone.app.testing import IntegrationTesting
from plone.app.testing import applyProfile
from zope.configuration import xmlconfig


class CollectiveSAML2(PloneSandboxLayer):

    defaultBases = (PLONE_FIXTURE, )

    def setUpZope(self, app, configurationContext):
        # Load ZCML for this package
        import collective.saml2
        xmlconfig.file('configure.zcml',
                       collective.saml2,
                       context=configurationContext)

    def setUpPloneSite(self, portal):
        applyProfile(portal, 'collective.saml2:default')


COLLECTIVE_SAML2_FIXTURE = CollectiveSAML2()
COLLECTIVE_SAML2_INTEGRATION_TESTING = \
    IntegrationTesting(bases=(COLLECTIVE_SAML2_FIXTURE, ),
                       name="CollectiveSAML2:Integration")
Exemple #10
0

class CrgisContentLayer(PloneSandboxLayer):

    defaultBases = (PLONE_APP_CONTENTTYPES_FIXTURE, )

    def setUpZope(self, app, configurationContext):
        # Load any other ZCML that is required for your tests.
        # The z3c.autoinclude feature is disabled in the Plone fixture base
        # layer.
        self.loadZCML(package=crgis.content)

    def setUpPloneSite(self, portal):
        applyProfile(portal, 'crgis.content:default')


CRGIS_CONTENT_FIXTURE = CrgisContentLayer()

CRGIS_CONTENT_INTEGRATION_TESTING = IntegrationTesting(
    bases=(CRGIS_CONTENT_FIXTURE, ),
    name='CrgisContentLayer:IntegrationTesting')

CRGIS_CONTENT_FUNCTIONAL_TESTING = FunctionalTesting(
    bases=(CRGIS_CONTENT_FIXTURE, ),
    name='CrgisContentLayer:FunctionalTesting')

CRGIS_CONTENT_ACCEPTANCE_TESTING = FunctionalTesting(
    bases=(CRGIS_CONTENT_FIXTURE, REMOTE_LIBRARY_BUNDLE_FIXTURE,
           z2.ZSERVER_FIXTURE),
    name='CrgisContentLayer:AcceptanceTesting')
from plone.app.testing import FunctionalTesting
from plone.app.testing import IntegrationTesting
from plone.app.testing import PLONE_FIXTURE
from plone.app.testing import PloneSandboxLayer
from plone.testing.z2 import ZSERVER_FIXTURE


class Fixture(PloneSandboxLayer):

    defaultBases = (PLONE_FIXTURE,)

    def setUpZope(self, app, configurationContext):
        # Load ZCML
        import ploneawards.theme
        self.loadZCML(package=ploneawards.theme)

    def setUpPloneSite(self, portal):
        # Install into Plone site using portal_setup
        self.applyProfile(portal, 'ploneawards.theme:default')

FIXTURE = Fixture()
INTEGRATION_TESTING = IntegrationTesting(
    bases=(FIXTURE,),
    name='ploneawards.theme:Integration',
)

FUNCTIONAL_TESTING = FunctionalTesting(
    bases=(FIXTURE, ZSERVER_FIXTURE),
    name='ploneawards.theme:Functional',
)
Exemple #12
0
        self.loadZCML(package=plone.restapi)
        self.loadZCML(package=redturtle.volto)
        self.loadZCML(package=plone.volto)
        self.loadZCML(package=plone.app.caching)
        self.loadZCML(package=kitconcept.seo)

    def setUpPloneSite(self, portal):
        applyProfile(portal, "plone.app.caching:default")
        applyProfile(portal, "redturtle.volto:default")


REDTURTLE_VOLTO_FIXTURE = RedturtleVoltoLayer()


REDTURTLE_VOLTO_INTEGRATION_TESTING = IntegrationTesting(
    bases=(REDTURTLE_VOLTO_FIXTURE,),
    name="RedturtleVoltoLayer:IntegrationTesting",
)


REDTURTLE_VOLTO_FUNCTIONAL_TESTING = FunctionalTesting(
    bases=(REDTURTLE_VOLTO_FIXTURE,),
    name="RedturtleVoltoLayer:FunctionalTesting",
)


REDTURTLE_VOLTO_ACCEPTANCE_TESTING = FunctionalTesting(
    bases=(
        REDTURTLE_VOLTO_FIXTURE,
        REMOTE_LIBRARY_BUNDLE_FIXTURE,
        z2.ZSERVER_FIXTURE,
    ),
Exemple #13
0
        setRoles(portal, TEST_USER_ID, ['Manager'])
        login(portal, TEST_USER_NAME)
        portal.invokeFactory('Folder', 'folder')

        # Commit so that the test browser sees these objects
        portal.portal_catalog.clearFindAndRebuild()
        import transaction
        transaction.commit()

    def tearDownZope(self, app):
        """Tear down Zope."""
        z2.uninstallProduct(app, 'osha.quizzes')


FIXTURE = OshaQuizzesLayer()
INTEGRATION_TESTING = IntegrationTesting(
    bases=(FIXTURE,), name="OshaQuizzesLayer:Integration")
FUNCTIONAL_TESTING = FunctionalTesting(
    bases=(FIXTURE,), name="OshaQuizzesLayer:Functional")


class IntegrationTestCase(unittest.TestCase):
    """Base class for integration tests."""

    layer = INTEGRATION_TESTING


class FunctionalTestCase(unittest.TestCase):
    """Base class for functional tests."""

    layer = FUNCTIONAL_TESTING
Exemple #14
0

class SixfeetupMegamenuLayer(PloneSandboxLayer):

    defaultBases = (PLONE_APP_CONTENTTYPES_FIXTURE, )

    def setUpZope(self, app, configurationContext):
        # Load any other ZCML that is required for your tests.
        # The z3c.autoinclude feature is disabled in the Plone fixture base
        # layer.
        self.loadZCML(package=sixfeetup.megamenu)

    def setUpPloneSite(self, portal):
        applyProfile(portal, 'sixfeetup.megamenu:default')


SIXFEETUP_MEGAMENU_FIXTURE = SixfeetupMegamenuLayer()

SIXFEETUP_MEGAMENU_INTEGRATION_TESTING = IntegrationTesting(
    bases=(SIXFEETUP_MEGAMENU_FIXTURE, ),
    name='SixfeetupMegamenuLayer:IntegrationTesting')

SIXFEETUP_MEGAMENU_FUNCTIONAL_TESTING = FunctionalTesting(
    bases=(SIXFEETUP_MEGAMENU_FIXTURE, ),
    name='SixfeetupMegamenuLayer:FunctionalTesting')

SIXFEETUP_MEGAMENU_ACCEPTANCE_TESTING = FunctionalTesting(
    bases=(SIXFEETUP_MEGAMENU_FIXTURE, REMOTE_LIBRARY_BUNDLE_FIXTURE,
           z2.ZSERVER_FIXTURE),
    name='SixfeetupMegamenuLayer:AcceptanceTesting')
Exemple #15
0
    defaultBases = (PLONE_FIXTURE,)

    def setUpZope(self, app, configurationContext):
        if HAS_COVER:
            import collective.cover
            self.loadZCML(package=collective.cover)

        import sc.embedder
        self.loadZCML(package=sc.embedder)

    def setUpPloneSite(self, portal):
        if HAS_COVER:
            self.applyProfile(portal, 'collective.cover:default')

        self.applyProfile(portal, 'sc.embedder:default')


FIXTURE = Fixture()

INTEGRATION_TESTING = IntegrationTesting(
    bases=(FIXTURE,), name='sc.embedder:Integration')

FUNCTIONAL_TESTING = FunctionalTesting(
    bases=(FIXTURE, z2.ZSERVER_FIXTURE), name='sc.embedder:Functional')

ROBOT_TESTING = FunctionalTesting(
    bases=(FIXTURE, AUTOLOGIN_LIBRARY_FIXTURE, z2.ZSERVER_FIXTURE),
    name='sc.embedder:Robot',
)
Exemple #16
0
# -*- coding: utf-8 -*-
from plone.app.testing import applyProfile
from plone.app.testing import IntegrationTesting
from plone.app.testing import PLONE_FIXTURE
from plone.app.testing import PloneSandboxLayer
from zope.configuration import xmlconfig


class PloneAppRegistry(PloneSandboxLayer):

    defaultBases = (PLONE_FIXTURE, )

    def setUpZope(self, app, configurationContext):
        # Load ZCML
        import plone.app.registry
        xmlconfig.file('configure.zcml',
                       plone.app.registry,
                       context=configurationContext)

    def setUpPloneSite(self, portal):
        applyProfile(portal, 'plone.app.registry:default')


PLONE_APP_REGISTRY_FIXTURE = PloneAppRegistry()

PLONE_APP_REGISTRY_INTEGRATION_TESTING = IntegrationTesting(
    bases=(PLONE_APP_REGISTRY_FIXTURE, ),
    name="plone.app.registry:Integration")
from plone.app.testing import PLONE_FIXTURE
from plone.app.testing import PloneSandboxLayer
from plone.app.testing import IntegrationTesting
from plone.app.testing import FunctionalTesting
from plone.app.testing import applyProfile

from zope.configuration import xmlconfig

class LeicesterPlonetheme(PloneSandboxLayer):

    defaultBases = (PLONE_FIXTURE, )

    def setUpZope(self, app, configurationContext):
        # Load ZCML for this package
        import leicester.plonetheme
        xmlconfig.file('configure.zcml',
                       leicester.plonetheme,
                       context=configurationContext)


    def setUpPloneSite(self, portal):
        applyProfile(portal, 'leicester.plonetheme:default')

LEICESTER_PLONETHEME_FIXTURE = LeicesterPlonetheme()
LEICESTER_PLONETHEME_INTEGRATION_TESTING = \
    IntegrationTesting(bases=(LEICESTER_PLONETHEME_FIXTURE, ),
                       name="LeicesterPlonetheme:Integration")
    def setUpZope(self, app, configurationContext):
        # Load any other ZCML that is required for your tests.
        # The z3c.autoinclude feature is disabled in the Plone fixture base
        # layer.
        import plone.restapi
        self.loadZCML(package=plone.restapi)
        self.loadZCML(package=collective.metadataaudit)

    def setUpPloneSite(self, portal):
        applyProfile(portal, 'collective.metadataaudit:default')


COLLECTIVE_METADATAAUDIT_FIXTURE = CollectiveMetadataauditLayer()

COLLECTIVE_METADATAAUDIT_INTEGRATION_TESTING = IntegrationTesting(
    bases=(COLLECTIVE_METADATAAUDIT_FIXTURE, ),
    name='CollectiveMetadataauditLayer:IntegrationTesting',
)

COLLECTIVE_METADATAAUDIT_FUNCTIONAL_TESTING = FunctionalTesting(
    bases=(COLLECTIVE_METADATAAUDIT_FIXTURE, ),
    name='CollectiveMetadataauditLayer:FunctionalTesting',
)

COLLECTIVE_METADATAAUDIT_ACCEPTANCE_TESTING = FunctionalTesting(
    bases=(
        COLLECTIVE_METADATAAUDIT_FIXTURE,
        REMOTE_LIBRARY_BUNDLE_FIXTURE,
        z2.ZSERVER_FIXTURE,
    ),
    name='CollectiveMetadataauditLayer:AcceptanceTesting',
)
Exemple #19
0
class RapidoPloneLayer(PloneSandboxLayer):

    defaultBases = (PLONE_APP_CONTENTTYPES_FIXTURE, )

    def setUpZope(self, app, configurationContext):
        import rapido.plone.tests
        xmlconfig.file('configure.zcml',
                       rapido.plone.tests,
                       context=configurationContext)
        # Run the startup hook
        from plone.app.theming.plugins.hooks import onStartup
        onStartup(None)

    def setUpPloneSite(self, portal):
        applyProfile(portal, 'rapido.plone:default')


RAPIDO_PLONE_FIXTURE = RapidoPloneLayer()

RAPIDO_PLONE_INTEGRATION_TESTING = IntegrationTesting(
    bases=(RAPIDO_PLONE_FIXTURE, ), name='RapidoPloneLayer:IntegrationTesting')

RAPIDO_PLONE_FUNCTIONAL_TESTING = FunctionalTesting(
    bases=(RAPIDO_PLONE_FIXTURE, z2.ZSERVER_FIXTURE),
    name='RapidoPloneLayer:FunctionalTesting')

RAPIDO_PLONE_ACCEPTANCE_TESTING = FunctionalTesting(
    bases=(RAPIDO_PLONE_FIXTURE, REMOTE_LIBRARY_BUNDLE_FIXTURE,
           z2.ZSERVER_FIXTURE),
    name='RapidoPloneLayer:AcceptanceTesting')
    def setUpZope(self, app, configurationContext):
        # Load any other ZCML that is required for your tests.
        # The z3c.autoinclude feature is disabled in the Plone fixture base
        # layer.
        import plone.restapi
        self.loadZCML(package=plone.restapi)
        self.loadZCML(package=plonetheme.munich)

    def setUpPloneSite(self, portal):
        applyProfile(portal, 'plonetheme.munich:default')


PLONETHEME_MUNICH_FIXTURE = PlonethemeMunichLayer()

PLONETHEME_MUNICH_INTEGRATION_TESTING = IntegrationTesting(
    bases=(PLONETHEME_MUNICH_FIXTURE, ),
    name='PlonethemeMunichLayer:IntegrationTesting',
)

PLONETHEME_MUNICH_FUNCTIONAL_TESTING = FunctionalTesting(
    bases=(PLONETHEME_MUNICH_FIXTURE, ),
    name='PlonethemeMunichLayer:FunctionalTesting',
)

PLONETHEME_MUNICH_ACCEPTANCE_TESTING = FunctionalTesting(
    bases=(
        PLONETHEME_MUNICH_FIXTURE,
        REMOTE_LIBRARY_BUNDLE_FIXTURE,
        z2.ZSERVER_FIXTURE,
    ),
    name='PlonethemeMunichLayer:AcceptanceTesting',
)
Exemple #21
0
        workflow_tool.setDefaultChain('simple_publication_workflow')
        # install the policy package
        self.applyProfile(portal, 'canaimagnulinux.wizard:default')

    def tearDownZope(self, app):
        # Uninstall products installed above
        z2.uninstallProduct(app, 'canaimagnulinux.wizard')


FIXTURE = Fixture()
"""
We use this base for all the tests in this package. If necessary,
we can put common utility or setup code in here. This applies to unit
test cases.
"""
INTEGRATION_TESTING = IntegrationTesting(
    bases=(FIXTURE, ), name='canaimagnulinux.wizard:Integration')
"""
We use this for functional integration tests. Again, we can put basic
common utility or setup code in here.
"""
FUNCTIONAL_TESTING = FunctionalTesting(
    bases=(FIXTURE, ), name='canaimagnulinux.wizard:Functional')
"""
We use this for functional integration tests with robot framework. Again,
we can put basic common utility or setup code in here.
"""
ROBOT_TESTING = FunctionalTesting(
    bases=(FIXTURE, AUTOLOGIN_LIBRARY_FIXTURE, z2.ZSERVER_FIXTURE),
    name='canaimagnulinux.wizard:Robot',
)
    defaultBases = (PLONE_FIXTURE, )

    def setUpZope(self, app, configurationContext):
        import collective.remoteproxy

        self.loadZCML(package=collective.remoteproxy)

    def setUpPloneSite(self, portal):
        applyProfile(portal, "collective.remoteproxy:default")


COLLECTIVE_REMOTEPROXY_FIXTURE = BrowserLayer()

COLLECTIVE_REMOTEPROXY_INTEGRATION_TESTING = IntegrationTesting(
    bases=(COLLECTIVE_REMOTEPROXY_FIXTURE, ),
    name="BrowserLayer:IntegrationTesting")

COLLECTIVE_REMOTEPROXY_FUNCTIONAL = FunctionalTesting(
    bases=(COLLECTIVE_REMOTEPROXY_FIXTURE, ),
    name="BrowserLayer:FunctionalTesting")

COLLECTIVE_REMOTEPROXY_ACCEPTANCE_TESTING = FunctionalTesting(
    bases=(
        COLLECTIVE_REMOTEPROXY_FIXTURE,
        REMOTE_LIBRARY_BUNDLE_FIXTURE,
        z2.ZSERVER_FIXTURE,
    ),
    name="BrowserLayer:AcceptanceTesting",
)
Exemple #23
0
import ulearn5.demo


class Ulearn5DemoLayer(PloneSandboxLayer):

    defaultBases = (PLONE_APP_CONTENTTYPES_FIXTURE, )

    def setUpZope(self, app, configurationContext):
        # Load any other ZCML that is required for your tests.
        # The z3c.autoinclude feature is disabled in the Plone fixture base
        # layer.
        self.loadZCML(package=ulearn5.demo)

    def setUpPloneSite(self, portal):
        applyProfile(portal, 'ulearn5.demo:default')


ULEARN5_DEMO_FIXTURE = Ulearn5DemoLayer()

ULEARN5_DEMO_INTEGRATION_TESTING = IntegrationTesting(
    bases=(ULEARN5_DEMO_FIXTURE, ), name='Ulearn5DemoLayer:IntegrationTesting')

ULEARN5_DEMO_FUNCTIONAL_TESTING = FunctionalTesting(
    bases=(ULEARN5_DEMO_FIXTURE, ), name='Ulearn5DemoLayer:FunctionalTesting')

ULEARN5_DEMO_ACCEPTANCE_TESTING = FunctionalTesting(
    bases=(ULEARN5_DEMO_FIXTURE, REMOTE_LIBRARY_BUNDLE_FIXTURE,
           z2.ZSERVER_FIXTURE),
    name='Ulearn5DemoLayer:AcceptanceTesting')
Exemple #24
0

class UkbgMedienportalLayer(PloneSandboxLayer):

    defaultBases = (PLONE_FIXTURE, )

    def setUpZope(self, app, configurationContext):
        # Load any other ZCML that is required for your tests.
        # The z3c.autoinclude feature is disabled in the Plone fixture base
        # layer.
        self.loadZCML(package=ukbg.medienportal)

    def setUpPloneSite(self, portal):
        applyProfile(portal, 'ukbg.medienportal:default')


UKBG_MEDIENPORTAL_FIXTURE = UkbgMedienportalLayer()

UKBG_MEDIENPORTAL_INTEGRATION_TESTING = IntegrationTesting(
    bases=(UKBG_MEDIENPORTAL_FIXTURE, ),
    name='UkbgMedienportalLayer:IntegrationTesting')

UKBG_MEDIENPORTAL_FUNCTIONAL_TESTING = FunctionalTesting(
    bases=(UKBG_MEDIENPORTAL_FIXTURE, ),
    name='UkbgMedienportalLayer:FunctionalTesting')

UKBG_MEDIENPORTAL_ACCEPTANCE_TESTING = FunctionalTesting(
    bases=(UKBG_MEDIENPORTAL_FIXTURE, REMOTE_LIBRARY_BUNDLE_FIXTURE,
           z2.ZSERVER_FIXTURE),
    name='UkbgMedienportalLayer:AcceptanceTesting')
Exemple #25
0
from plone.app.testing import PloneWithPackageLayer
from plone.app.testing import IntegrationTesting
from plone.app.testing import FunctionalTesting

import imio.urban.dataimport

IMIO_URBAN_DATAIMPORT = PloneWithPackageLayer(
    zcml_package=imio.urban.dataimport,
    zcml_filename='testing.zcml',
    gs_profile_id='imio.urban.dataimport:testing',
    name="IMIO_URBAN_DATAIMPORT")

IMIO_URBAN_DATAIMPORT_INTEGRATION = IntegrationTesting(
    bases=(IMIO_URBAN_DATAIMPORT, ), name="IMIO_URBAN_DATAIMPORT_INTEGRATION")

IMIO_URBAN_DATAIMPORT_FUNCTIONAL = FunctionalTesting(
    bases=(IMIO_URBAN_DATAIMPORT, ), name="IMIO_URBAN_DATAIMPORT_FUNCTIONAL")
    def setUpZope(self, app, configurationContext):
        # Load any other ZCML that is required for your tests.
        # The z3c.autoinclude feature is disabled in the Plone fixture base
        # layer.
        self.loadZCML(package=plone.restapi)
        self.loadZCML(package=redturtle.rssservice)

    def setUpPloneSite(self, portal):
        applyProfile(portal, 'plone.restapi:default')


REDTURTLE_RSSSERVICE_FIXTURE = RedTurtleRSSServiceLayer()

REDTURTLE_RSSSERVICE_INTEGRATION_TESTING = IntegrationTesting(
    bases=(REDTURTLE_RSSSERVICE_FIXTURE, ),
    name='RedTurtleRSSServiceLayer:IntegrationTesting',
)

REDTURTLE_RSSSERVICE_FUNCTIONAL_TESTING = FunctionalTesting(
    bases=(REDTURTLE_RSSSERVICE_FIXTURE, ),
    name='RedTurtleRSSServiceLayer:FunctionalTesting',
)

REDTURTLE_RSSSERVICE_ACCEPTANCE_TESTING = FunctionalTesting(
    bases=(
        REDTURTLE_RSSSERVICE_FIXTURE,
        REMOTE_LIBRARY_BUNDLE_FIXTURE,
        z2.ZSERVER_FIXTURE,
    ),
    name='RedTurtleRSSServiceLayer:AcceptanceTesting',
)
Exemple #27
0
    defaultBases = (PLONE_FIXTURE, BUILDER_LAYER)

    def setUpZope(self, app, configurationContext):
        xmlconfig.string(
            '<configure xmlns="http://namespaces.zope.org/zope">'
            '  <include package="z3c.autoinclude" file="meta.zcml" />'
            '  <includePlugins package="plone" />'
            '  <includePluginsOverrides package="plone" />'
            '</configure>',
            context=configurationContext)

        z2.installProduct(app, 'ftw.task')
        z2.installProduct(app, 'egov.contactdirectory')

    def setUpPloneSite(self, portal):
        applyProfile(portal, 'ftw.task:default')
        applyProfile(portal, 'ftw.tabbedview:default')
        applyProfile(portal, 'egov.contactdirectory:default')

        setRoles(portal, TEST_USER_ID, ['Manager'])
        login(portal, TEST_USER_NAME)


FTW_TASK_FIXTURE = FtwTaskLayer()
FTW_TASK_INTEGRATION_TESTING = IntegrationTesting(bases=(FTW_TASK_FIXTURE, ),
                                                  name="FtwTask:Integration")
FTW_TASK_FUNCTIONAL_TESTING = FunctionalTesting(
    bases=(FTW_TASK_FIXTURE,
           set_builder_session_factory(functional_session_factory)),
    name='FtwTask:Functional')
Exemple #28
0
        login(portal, TEST_USER_NAME)
        portal.invokeFactory('Folder', 'folder')
        portal.invokeFactory('File', 'file1')

        # Commit so that the test browser sees these objects
        portal.portal_catalog.clearFindAndRebuild()
        import transaction
        transaction.commit()

    def tearDownZope(self, app):
        """Tear down Zope."""
        z2.uninstallProduct(app, 'collective.downloadtracker')


FIXTURE = CollectiveDownloadtrackerLayer()
INTEGRATION_TESTING = IntegrationTesting(
    bases=(FIXTURE, ), name="CollectiveDownloadtrackerLayer:Integration")
FUNCTIONAL_TESTING = FunctionalTesting(
    bases=(FIXTURE, ), name="CollectiveDownloadtrackerLayer:Functional")


class IntegrationTestCase(unittest.TestCase):
    """Base class for integration tests."""

    layer = INTEGRATION_TESTING


class FunctionalTestCase(unittest.TestCase):
    """Base class for functional tests."""

    layer = FUNCTIONAL_TESTING
Exemple #29
0
        import z3c.jbot
        self.loadZCML(package=z3c.jbot)
        import sll.basetheme
        self.loadZCML(package=sll.basetheme)

    def setUpPloneSite(self, portal):
        """Set up Plone."""
        # Install into Plone site using portal_setup
        self.applyProfile(portal, 'sll.basetheme:default')

    def tearDownZope(self, app):
        """Tear down Zope."""


FIXTURE = SllBasethemeLayer()
INTEGRATION_TESTING = IntegrationTesting(bases=(FIXTURE, ),
                                         name="SllBasethemeLayer:Integration")
FUNCTIONAL_TESTING = FunctionalTesting(bases=(FIXTURE, ),
                                       name="SllBasethemeLayer:Functional")


class IntegrationTestCase(unittest.TestCase):
    """Base class for integration tests."""

    layer = INTEGRATION_TESTING


class FunctionalTestCase(unittest.TestCase):
    """Base class for functional tests."""

    layer = FUNCTIONAL_TESTING
        # Load ZCML
        import collective.mailchimp

        xmlconfig.file(
            'configure.zcml',
            collective.mailchimp,
            context=configurationContext,
        )

    def setUpPloneSite(self, portal):
        applyProfile(portal, 'collective.mailchimp:default')

        registry = getUtility(IRegistry)
        mailchimp_settings = registry.forInterface(IMailchimpSettings)
        mailchimp_settings.api_key = DUMMY_API_KEY

    def tearDownZope(self, app):
        # Undo our requests patch.
        self.requests_patcher.stop()


COLLECTIVE_MAILCHIMP_FIXTURE = CollectiveMailchimp()
COLLECTIVE_MAILCHIMP_INTEGRATION_TESTING = IntegrationTesting(
    bases=(COLLECTIVE_MAILCHIMP_FIXTURE,),
    name="CollectiveMailchimp:Integration",
)
COLLECTIVE_MAILCHIMP_FUNCTIONAL_TESTING = FunctionalTesting(
    bases=(COLLECTIVE_MAILCHIMP_FIXTURE,),
    name="CollectiveMailchimp:Functional",
)
 def testSetUp(self):
     BIntegrationTesting.testSetUp(self)
     LayerMixin.testSetUp(self)
Exemple #32
0
import wise.content


class WiseContentLayer(PloneSandboxLayer):

    defaultBases = (PLONE_FIXTURE,)

    def setUpZope(self, app, configurationContext):
        # Load any other ZCML that is required for your tests.
        # The z3c.autoinclude feature is disabled in the Plone fixture base
        # layer.
        self.loadZCML(package=wise.content)

    def setUpPloneSite(self, portal):
        applyProfile(portal, 'wise.content:default')


WISE_CONTENT_FIXTURE = WiseContentLayer()


WISE_CONTENT_INTEGRATION_TESTING = IntegrationTesting(
    bases=(WISE_CONTENT_FIXTURE,),
    name='WiseContentLayer:IntegrationTesting'
)


WISE_CONTENT_FUNCTIONAL_TESTING = FunctionalTesting(
    bases=(WISE_CONTENT_FIXTURE,),
    name='WiseContentLayer:FunctionalTesting'
)