Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix tests

  • Loading branch information...
commit b71bd039b97b68f7ca4e83a72e996b0e2128a552 1 parent 12e38b0
@toutpt toutpt authored
View
4 collective/linguasitemap/browser/sitemap.py
@@ -1,4 +1,4 @@
-from plone.app.layout.sitemap.sitemap import SiteMapView as BaseView
+from plone.app.layout.sitemap import sitemap as base
from BTrees.OOBTree import OOBTree
from Products.CMFCore.utils import getToolByName
from Products.CMFPlone.interfaces import IPloneSiteRoot
@@ -43,7 +43,7 @@ def extractLanguage(self, name):
return lang
-class SiteMapView(BaseView):
+class SiteMapView(base.SiteMapView):
"""override sitemap"""
def __init__(self, context, request):
View
4 collective/linguasitemap/tests/base.py
@@ -2,6 +2,8 @@
from zope import interface
from collective.linguasitemap import testing
from collective.linguasitemap.tests import utils
+from collective.linguasitemap.browser.interfaces import ILayer
+from plone.browserlayer.layer import mark_layer
class IntegrationTestCase(unittest.TestCase):
@@ -21,6 +23,8 @@ def setUp(self):
self.folder.setLanguage('fr')
self.folder.reindexObject()
self.portal.portal_properties.site_properties.enable_sitemap = True
+ self.request = self.layer['request']
+ mark_layer(self.portal, self)
class FunctionalTestCase(IntegrationTestCase):
View
1  collective/linguasitemap/tests/test_sitemap.py
@@ -23,7 +23,6 @@ def test_language(self):
self.assertTrue(hasattr(sm, 'language'))
self.assertEqual(sm.language,'all')
- #FIXME: theses tests fails... don't know why
sm = component.getMultiAdapter((self.portal, self.portal.REQUEST),
name="sitemap.xml.gz")
self.assertTrue(hasattr(sm, 'language'))
Please sign in to comment.
Something went wrong with that request. Please try again.