Ignore:
Timestamp:
Jun 16, 2010 2:28:02 PM (9 years ago)
Author:
mylan
Message:

Merged revisions 3566-3575 via svnmerge from
http://svn.quintagroup.com/products/quintagroup.plonegooglesitemaps/branches/test_refactoring

........

r3566 | mylan | 2010-06-14 12:24:52 +0300 (Mon, 14 Jun 2010) | 1 line


#206: Split single testqPloneGoogleSitemaps module into several specific one

........

r3567 | mylan | 2010-06-14 16:14:34 +0300 (Mon, 14 Jun 2010) | 1 line


#206: Improve code coverage - remove useless BBB code from interfaces.

........

r3568 | mylan | 2010-06-14 20:24:25 +0300 (Mon, 14 Jun 2010) | 1 line


#206: Improve code coverage - added test for MobileSitemap?, MobileSitemapView?.

........

r3569 | mylan | 2010-06-14 22:39:39 +0300 (Mon, 14 Jun 2010) | 1 line


#206: reorganize sitemap tests

........

r3570 | mylan | 2010-06-14 22:40:12 +0300 (Mon, 14 Jun 2010) | 1 line


#206: Added configlet tests

........

r3571 | mylan | 2010-06-14 23:05:19 +0300 (Mon, 14 Jun 2010) | 1 line


#206: remove BBB code for plone<3.0

........

r3572 | mylan | 2010-06-14 23:12:00 +0300 (Mon, 14 Jun 2010) | 1 line


#206: added workflow vocabularies tests for SitemapTypes?

........

r3573 | mylan | 2010-06-15 21:36:40 +0300 (Tue, 15 Jun 2010) | 1 line


#206: some cleanup, simplify tests

........

r3574 | mylan | 2010-06-16 16:35:31 +0300 (Wed, 16 Jun 2010) | 1 line


#206: move mobile sitemap code preparation into base module

........

r3575 | mylan | 2010-06-16 16:37:14 +0300 (Wed, 16 Jun 2010) | 1 line


#206: Added security tests

........

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  
    99 
    1010from zope.testing import doctestunit 
     11from zope.interface import Interface 
    1112from zope.component import testing 
    1213from Testing import ZopeTestCase as ztc 
     
    2526from quintagroup.plonegooglesitemaps.config import PROJECTNAME 
    2627from quintagroup.plonegooglesitemaps.config import ping_googlesitemap 
     28from quintagroup.plonegooglesitemaps.browser import mobilesitemapview 
    2729 
    2830quintagroup.plonegooglesitemaps.config.testing = 1 
     
    3032 
    3133 
    32 class MixinTestCase: 
     34class IMobileMarker(Interface): 
     35    """Test Marker interface for mobile objects""" 
     36 
     37 
     38class MixinTestCase(object): 
    3339    """ Define layer and common afterSetup method with package installation. 
    3440        Package installation on plone site setup impossible because of 
     
    3945    def afterSetUp(self): 
    4046        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 
    4158 
    4259 
     
    4461    """ For unit tests """ 
    4562 
     63 
    4664class FunctionalTestCase(MixinTestCase, ptc.FunctionalTestCase): 
    4765    """ For functional tests """ 
     66 
     67    def afterSetUp(self): 
     68        super(FunctionalTestCase, self).afterSetUp() 
     69        self.auth = "%s:%s" % (portal_owner, default_password) 
    4870 
    4971# Initialize all needed zcml directives 
Note: See TracChangeset for help on using the changeset viewer.