Ignore:
Timestamp:
Apr 20, 2011 4:02:03 PM (9 years ago)
Author:
zidane
Message:

fixes pyflakes and pylint

File:
1 edited

Legend:

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

    r3152 r3163  
    33# 
    44 
    5 from base import * 
    6 from cgi import FieldStorage 
    7 from tempfile import TemporaryFile, NamedTemporaryFile 
     5from quintagroup.plonegooglesitemaps.tests.base import FunctionalTestCase 
     6from StringIO import StringIO 
     7from urllib import urlencode 
     8import unittest 
    89 
    9 from OFS.Image import cookId 
    1010from Products.CMFPlone.utils import _createObjectByType 
    11 from ZPublisher.HTTPRequest import FileUpload 
    1211 
    1312 
     
    3938        self.assertEqual(resp.getHeader("Location").endswith(sm_edit), True) 
    4039        # Add SM 
    41         sm = self.portal["sitemap.xml"] 
    42         #sm.setPortalTypes(("Documents",)) 
     40        self.portal["sitemap.xml"] 
     41        #self.portal["sitemap.xml"].setPortalTypes(("Documents",)) 
    4342        newform = self.publish(self.settingsURL, basic=self.auth).getBody() 
    4443        self.assertEqual('href="http://nohost/plone/sitemap.xml/edit"' in \ 
     
    5251        self.assertEqual(resp.getHeader("Location").endswith(sm_edit), True) 
    5352        # Add SM 
    54         sm = self.portal["news-sitemap.xml"] 
    55         #sm.setPortalTypes(("News Item",)) 
     53        self.portal["news-sitemap.xml"] 
     54        #self.portal["news-sitemap.xml"].setPortalTypes(("News Item",)) 
    5655        newform = self.publish(self.settingsURL, basic=self.auth).getBody() 
    5756        self.assertEqual('href="http://nohost/plone/news-sitemap.xml/edit"' \ 
     
    6564        self.assertEqual(resp.getHeader("Location").endswith(msm_edit), True) 
    6665        # Add SM 
    67         sm = self.portal["mobile-sitemap.xml"] 
    68         #sm.setPortalTypes(("Documents",)) 
     66        self.portal["mobile-sitemap.xml"] 
     67        #self.portal["mobile-sitemap.xml"].setPortalTypes(("Documents",)) 
    6968        newform = self.publish(self.settingsURL, basic=self.auth).getBody() 
    7069        self.assertEqual('href="http://nohost/plone/mobile-sitemap.xml/edit"' \ 
     
    9392 
    9493def test_suite(): 
    95     from unittest import TestSuite, makeSuite 
    96     suite = TestSuite() 
    97     suite.addTest(makeSuite(TestConfigletSettings)) 
    98     suite.addTest(makeSuite(TestConfigletOverview)) 
     94    suite = unittest.TestSuite() 
     95    suite.addTest(unittest.makeSuite(TestConfigletSettings)) 
     96    suite.addTest(unittest.makeSuite(TestConfigletOverview)) 
    9997    return suite 
    10098 
Note: See TracChangeset for help on using the changeset viewer.