Skip to content

Commit

Permalink
fix almost all p5 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenkling committed Sep 4, 2013
1 parent 20d4d86 commit aee6217
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/plone/app/theming/testing.py
@@ -1,5 +1,6 @@
from plone.app.testing import PloneSandboxLayer
from plone.app.testing import PLONE_FIXTURE
from plone.app.contenttypes.testing import PLONE_APP_CONTENTTYPES_FIXTURE

This comment has been minimized.

Copy link
@sunew

sunew May 3, 2014

Contributor

a) theres no dependency in setup.py on plone.app.contenttypes
b) I think it is a bad idea to introduce a dependency on p.a.contentypes just to be able to run tests. (I have still not gotten these tests to run with plone 4.3 core buildout)

This comment has been minimized.

Copy link
@datakurre

datakurre May 3, 2014

Member

👍

Maybe p.a.contenttypes dependency belongs to p.a.testing (in PloneSandboxLayer) in a way that 4.x tests could simply depend on different version of p.a.testing than 5.x tests?

This comment has been minimized.

Copy link
@sunew

sunew May 16, 2014

Contributor

yes that sounds like a perfect solution. Where do we add this idea these days? github issues or plone trac?


from plone.app.testing import applyProfile

from zope.configuration import xmlconfig
Expand All @@ -8,7 +9,7 @@


class Theming(PloneSandboxLayer):
defaultBases = (PLONE_FIXTURE,)
defaultBases = (PLONE_APP_CONTENTTYPES_FIXTURE,)

def setUpZope(self, app, configurationContext):
# load ZCML
Expand All @@ -25,7 +26,7 @@ def setUpPloneSite(self, portal):


class ThemingWithCaching(Theming):
defaultBases = (PLONE_FIXTURE,)
defaultBases = (PLONE_APP_CONTENTTYPES_FIXTURE,)

def setUpZope(self, app, configurationContext):
# load ZCML
Expand Down
3 changes: 2 additions & 1 deletion src/plone/app/theming/tests/test_transform.py
Expand Up @@ -479,6 +479,8 @@ def test_theme_different_path(self):

setRoles(portal, TEST_USER_ID, ('Manager',))
portal.invokeFactory('Folder', 'news', title=u"News")
wftool = getToolByName(portal, "portal_workflow")
wftool.doActionFor(portal.news, action='publish')
setRoles(portal, TEST_USER_ID, ('Member',))

self.settings.enabled = True
Expand Down Expand Up @@ -705,7 +707,6 @@ def test_includes(self):

# In the subfolder, we've reversed alpha and beta. We should now get
# 'one' twice, since we still get alpha from the site root.

browser.open(portal['subfolder'].absolute_url())
self.assertTrue('<div id="alpha">Number one</div>' in browser.contents)
self.assertTrue('<div id="beta">Number one</div>' in browser.contents)
Expand Down

1 comment on commit aee6217

@mister-roboto
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing information:

Please sign in to comment.