Ignore:
Timestamp:
Apr 20, 2011 8:20:36 AM (13 years ago)
Author:
zidane
Message:

fixes pep8

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/tests/testSecurity.py

    r2538 r3152  
    77from Products.CMFPlone.utils import _createObjectByType 
    88 
     9 
    910class MixinSecurity(FunctionalTestCase): 
    1011 
    1112    def getview(self, vpath): 
    12         return self.publish("/"+self.portal.absolute_url(1)+"/"+vpath, self.auth) 
     13        return self.publish("/" + self.portal.absolute_url(1) + \ 
     14                            "/" + vpath, self.auth) 
    1315 
    1416 
     
    1820        super(TestSecurityConfigletManager, self).afterSetUp() 
    1921        self.auth = "admin:admin" 
    20         self.portal.portal_membership.addMember('admin', 'admin', ('Manager',), []) 
     22        self.portal.portal_membership.addMember('admin', 'admin', 
     23                                                ('Manager',), []) 
    2124 
    2225    def testConfigOverview(self): 
     
    6063from DateTime import DateTime 
    6164 
     65 
    6266class TestSecuritySiteMaps(MixinSecurity): 
    6367 
     
    7377        for smtype, smdata in SM_TYPES.items(): 
    7478            _createObjectByType("Sitemap", self.portal, id=smdata["id"], 
    75                                 sitemapType=smtype, portalTypes=smdata["types"]) 
     79                                sitemapType=smtype, 
     80                                portalTypes=smdata["types"]) 
    7681            sm = getattr(self.portal, smdata["id"]) 
    7782            sm.at_post_create_script() 
     
    8186        self.my_doc = _createObjectByType('Document', self.portal, id='my_doc') 
    8287        self.workflow.doActionFor(self.my_doc, 'publish') 
    83         self.my_news = _createObjectByType('News Item', self.portal, id='my_news') 
     88        self.my_news = _createObjectByType('News Item', self.portal, 
     89                                           id='my_news') 
    8490        self.my_news.edit(title="My News Item (test)", 
    8591                          effectiveDate=DateTime().strftime("%Y-%m-%d")) 
    8692        self.workflow.doActionFor(self.my_news, 'publish') 
    87         # mobile content must provides additional interfaces to fall into mobile sitemap 
     93        # mobile content must provides additional interfaces 
     94        # to fall into mobile sitemap 
    8895        alsoProvides(self.my_doc, IMobileMarker) 
    8996        self.my_doc.reindexObject() 
     
    100107        self.assert_("loc" in start) 
    101108        self.assert_(self.my_doc.absolute_url() in data) 
    102          
     109 
    103110    def testNewsSM(self): 
    104111        resp = self.getview("news-sitemap.xml") 
     
    107114        self.assert_("n:name" in start) 
    108115        self.assert_("My News Item" in data) 
    109          
     116 
    110117    def testMobileSM(self): 
    111118        resp = self.getview("mobile-sitemap.xml") 
     
    114121        self.assert_("loc" in start) 
    115122        self.assert_(self.my_doc.absolute_url() in data) 
    116          
     123 
    117124 
    118125def test_suite(): 
Note: See TracChangeset for help on using the changeset viewer.