from plone.app.testing import PloneSandboxLayer
from plone.app.testing import applyProfile
from plone.app.testing import PLONE_FIXTURE
from plone.app.testing import IntegrationTesting
from plone.testing import z2
from zope.configuration import xmlconfig


class CollectiveBadgeLayer(PloneSandboxLayer):

    defaultBases = (PLONE_FIXTURE,)

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

        z2.installProduct(app, 'collective.workspace')

    def testDownZope(self, app, configurationContext):
        z2.uninstallProduct(app, 'collective.workspace')

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


COLLECTIVE_BADGE_FIXTURE = CollectiveBadgeLayer()
COLLECTIVE_BADGE_INTEGRATION_TESTING = IntegrationTesting(
    bases=(COLLECTIVE_BADGE_FIXTURE,),
    name="CollectiveBadgeLayer:Integration"
)

92cb1656e82b468f6e15d0b96e2b5f29e57c2e2c
<mask token>


class CollectiveBadgeLayer(PloneSandboxLayer):
    <mask token>

    def setUpZope(self, app, configurationContext):
        import collective.badge
        xmlconfig.file('configure.zcml', collective.badge, context=
            configurationContext)
        z2.installProduct(app, 'collective.workspace')

    def testDownZope(self, app, configurationContext):
        z2.uninstallProduct(app, 'collective.workspace')

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


<mask token>

<mask token>


class CollectiveBadgeLayer(PloneSandboxLayer):
    defaultBases = PLONE_FIXTURE,

    def setUpZope(self, app, configurationContext):
        import collective.badge
        xmlconfig.file('configure.zcml', collective.badge, context=
            configurationContext)
        z2.installProduct(app, 'collective.workspace')

    def testDownZope(self, app, configurationContext):
        z2.uninstallProduct(app, 'collective.workspace')

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


<mask token>

<mask token>


class CollectiveBadgeLayer(PloneSandboxLayer):
    defaultBases = PLONE_FIXTURE,

    def setUpZope(self, app, configurationContext):
        import collective.badge
        xmlconfig.file('configure.zcml', collective.badge, context=
            configurationContext)
        z2.installProduct(app, 'collective.workspace')

    def testDownZope(self, app, configurationContext):
        z2.uninstallProduct(app, 'collective.workspace')

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


COLLECTIVE_BADGE_FIXTURE = CollectiveBadgeLayer()
COLLECTIVE_BADGE_INTEGRATION_TESTING = IntegrationTesting(bases=(
    COLLECTIVE_BADGE_FIXTURE,), name='CollectiveBadgeLayer:Integration')

from plone.app.testing import PloneSandboxLayer
from plone.app.testing import applyProfile
from plone.app.testing import PLONE_FIXTURE
from plone.app.testing import IntegrationTesting
from plone.testing import z2
from zope.configuration import xmlconfig


class CollectiveBadgeLayer(PloneSandboxLayer):
    defaultBases = PLONE_FIXTURE,

    def setUpZope(self, app, configurationContext):
        import collective.badge
        xmlconfig.file('configure.zcml', collective.badge, context=
            configurationContext)
        z2.installProduct(app, 'collective.workspace')

    def testDownZope(self, app, configurationContext):
        z2.uninstallProduct(app, 'collective.workspace')

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


COLLECTIVE_BADGE_FIXTURE = CollectiveBadgeLayer()
COLLECTIVE_BADGE_INTEGRATION_TESTING = IntegrationTesting(bases=(
    COLLECTIVE_BADGE_FIXTURE,), name='CollectiveBadgeLayer:Integration')

from plone.app.testing import PloneSandboxLayer
from plone.app.testing import applyProfile
from plone.app.testing import PLONE_FIXTURE
from plone.app.testing import IntegrationTesting
from plone.testing import z2
from zope.configuration import xmlconfig


class CollectiveBadgeLayer(PloneSandboxLayer):

    defaultBases = (PLONE_FIXTURE,)

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

        z2.installProduct(app, 'collective.workspace')

    def testDownZope(self, app, configurationContext):
        z2.uninstallProduct(app, 'collective.workspace')

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


COLLECTIVE_BADGE_FIXTURE = CollectiveBadgeLayer()
COLLECTIVE_BADGE_INTEGRATION_TESTING = IntegrationTesting(
    bases=(COLLECTIVE_BADGE_FIXTURE,),
    name="CollectiveBadgeLayer:Integration"
)
