Skip to content

Commit

Permalink
add convenience-method to add the browser-layer to the request
Browse files Browse the repository at this point in the history
  • Loading branch information
pbauer committed Feb 12, 2014
1 parent 126af9d commit 000167a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions plone/app/contenttypes/testing.py
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
from plone.app.contenttypes.interfaces import IPloneAppContenttypesLayer
from plone.app.event.testing import PAEvent_FIXTURE
from plone.app.testing import PloneSandboxLayer
from plone.app.testing import applyProfile
Expand All @@ -10,10 +11,20 @@
from plone.app.testing import login
from plone.testing import z2
from zope.configuration import xmlconfig
from zope.interface import alsoProvides

import pkg_resources


def set_browserlayer(request):
"""Set the BrowserLayer for the request.
We have to set the browserlayer manually, since importing the profile alone
doesn't do it in tests.
"""
alsoProvides(request, IPloneAppContenttypesLayer)


class PloneAppContenttypes(PloneSandboxLayer):

defaultBases = (PAEvent_FIXTURE, PLONE_FIXTURE,)
Expand Down

1 comment on commit 000167a

@mister-roboto
Copy link

Choose a reason for hiding this comment

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

TESTS FAILED
Mr.Roboto url : http://jenkins.plone.org/roboto/get_info?push=8d914365d8fe45dfb29448dbac492f91
[SUCCESS] kgs-plone.app.contenttypes-plone-5.0-python-2.7 kgs
[FAILURE] kgs-plone.app.contenttypes-plone-4.3-python-2.6 kgs
[FAILURE] kgs-plone.app.contenttypes-plone-4.3-python-2.7 kgs

Please sign in to comment.