-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
some refactoring to improve tests and allow users to access data
- Loading branch information
Showing
20 changed files
with
630 additions
and
300 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,51 @@ | ||
# -*- coding: utf-8 -*- | ||
from plone.app.robotframework.testing import REMOTE_LIBRARY_BUNDLE_FIXTURE | ||
from plone.app.testing import applyProfile | ||
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 import z2 | ||
from plone.testing.zope import WSGI_SERVER_FIXTURE | ||
from plone.app.contenttypes.testing import PLONE_APP_CONTENTTYPES_FIXTURE | ||
|
||
import collective.feedback | ||
import plone.app.dexterity | ||
import plone.restapi | ||
import souper.plone | ||
import collective.honeypot | ||
import collective.honeypot.config | ||
|
||
collective.honeypot.config.EXTRA_PROTECTED_ACTIONS = set(["feedback-add"]) | ||
collective.honeypot.config.HONEYPOT_FIELD = "honey" | ||
|
||
class CollectiveFeedbackLayer(PloneSandboxLayer): | ||
defaultBases = (PLONE_FIXTURE,) | ||
|
||
class TestLayer(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=plone.app.dexterity) | ||
self.loadZCML(package=plone.restapi) | ||
self.loadZCML(package=collective.feedback) | ||
self.loadZCML(package=collective.honeypot) | ||
self.loadZCML(package=souper.plone) | ||
self.loadZCML(package=collective.feedback) | ||
|
||
def setUpPloneSite(self, portal): | ||
applyProfile(portal, "collective.feedback:default") | ||
|
||
|
||
COLLECTIVE_FEEDBACK_FIXTURE = CollectiveFeedbackLayer() | ||
FIXTURE = TestLayer() | ||
|
||
|
||
COLLECTIVE_FEEDBACK_INTEGRATION_TESTING = IntegrationTesting( | ||
bases=(COLLECTIVE_FEEDBACK_FIXTURE,), | ||
INTEGRATION_TESTING = IntegrationTesting( | ||
bases=(FIXTURE,), | ||
name="CollectiveFeedbackLayer:IntegrationTesting", | ||
) | ||
|
||
|
||
COLLECTIVE_FEEDBACK_FUNCTIONAL_TESTING = FunctionalTesting( | ||
bases=(COLLECTIVE_FEEDBACK_FIXTURE,), | ||
FUNCTIONAL_TESTING = FunctionalTesting( | ||
bases=(FIXTURE,), | ||
name="CollectiveFeedbackLayer:FunctionalTesting", | ||
) | ||
|
||
|
||
COLLECTIVE_FEEDBACK_ACCEPTANCE_TESTING = FunctionalTesting( | ||
bases=( | ||
COLLECTIVE_FEEDBACK_FIXTURE, | ||
REMOTE_LIBRARY_BUNDLE_FIXTURE, | ||
z2.ZSERVER_FIXTURE, | ||
), | ||
name="CollectiveFeedbackLayer:AcceptanceTesting", | ||
RESTAPI_TESTING = FunctionalTesting( | ||
bases=(FIXTURE, WSGI_SERVER_FIXTURE), | ||
name="CollectiveFeedbackLayer:RestAPITesting", | ||
) |
Oops, something went wrong.