Changeset 2538 in products for quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/tests/base.py
- Timestamp:
- Jun 16, 2010 2:28:02 PM (14 years ago)
- Location:
- quintagroup.plonegooglesitemaps/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.plonegooglesitemaps/trunk
- Property svnmerge-integrated changed from /quintagroup.plonegooglesitemaps/branches/test_refactoring:1-3563 to /quintagroup.plonegooglesitemaps/branches/test_refactoring:1-3576
- Property svn:mergeinfo set to /quintagroup.plonegooglesitemaps/branches/test_refactoring:2527-2536
-
quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/tests/base.py
r2394 r2538 9 9 10 10 from zope.testing import doctestunit 11 from zope.interface import Interface 11 12 from zope.component import testing 12 13 from Testing import ZopeTestCase as ztc … … 25 26 from quintagroup.plonegooglesitemaps.config import PROJECTNAME 26 27 from quintagroup.plonegooglesitemaps.config import ping_googlesitemap 28 from quintagroup.plonegooglesitemaps.browser import mobilesitemapview 27 29 28 30 quintagroup.plonegooglesitemaps.config.testing = 1 … … 30 32 31 33 32 class MixinTestCase: 34 class IMobileMarker(Interface): 35 """Test Marker interface for mobile objects""" 36 37 38 class MixinTestCase(object): 33 39 """ Define layer and common afterSetup method with package installation. 34 40 Package installation on plone site setup impossible because of … … 39 45 def afterSetUp(self): 40 46 self.loginAsPortalOwner() 47 self.workflow = self.portal.portal_workflow 48 self.orig_mobile_ifaces = None 49 50 def patchMobile(self): 51 # patch mobile sitemap view 52 self.orig_mobile_ifaces = mobilesitemapview.MOBILE_INTERFACES 53 mobilesitemapview.MOBILE_INTERFACES = [IMobileMarker.__identifier__,] 54 55 def beforeTearDown(self): 56 if self.orig_mobile_ifaces is not None: 57 mobilesitemapview.MOBILE_INTERFACES = self.orig_mobile_ifaces 41 58 42 59 … … 44 61 """ For unit tests """ 45 62 63 46 64 class FunctionalTestCase(MixinTestCase, ptc.FunctionalTestCase): 47 65 """ For functional tests """ 66 67 def afterSetUp(self): 68 super(FunctionalTestCase, self).afterSetUp() 69 self.auth = "%s:%s" % (portal_owner, default_password) 48 70 49 71 # Initialize all needed zcml directives
Note: See TracChangeset
for help on using the changeset viewer.