Index: quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/tests/testPinging.py
===================================================================
--- quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/tests/testPinging.py	(revision 2538)
+++ quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/tests/testPinging.py	(revision 3152)
@@ -7,17 +7,24 @@
     def afterSetUp(self):
         super(TestPinging, self).afterSetUp()
-        self.workflow.setChainForPortalTypes(pt_names=('News Item','Document'),
-                                             chain="simple_publication_workflow")
-        self.gsm_props = self.portal.portal_properties['googlesitemap_properties']
+        self.workflow.setChainForPortalTypes(
+                pt_names=('News Item', 'Document'),
+                chain="simple_publication_workflow")
+        gsm_properties = 'googlesitemap_properties'
+        self.gsm_props = self.portal.portal_properties[gsm_properties]
         # Add sitemaps
-        self.contentSM = _createObjectByType('Sitemap', self.portal, id='google-sitemaps')
-        self.contentSM.setPingTransitions(('simple_publication_workflow#publish',))
-        self.newsSM = _createObjectByType('Sitemap', self.portal, id='news-sitemaps')
-        self.newsSM.setPortalTypes(('News Item','Document'))
-        self.newsSM.setPingTransitions(('simple_publication_workflow#publish',))
-        self.sitemapUrl = '/'+self.portal.absolute_url(1) + '/google-sitemaps'
+        self.contentSM = _createObjectByType('Sitemap', self.portal,
+                                             id='google-sitemaps')
+        spw_publish = 'simple_publication_workflow#publish'
+        self.contentSM.setPingTransitions((spw_publish,))
+        self.newsSM = _createObjectByType('Sitemap', self.portal,
+                                          id='news-sitemaps')
+        self.newsSM.setPortalTypes(('News Item', 'Document'))
+        self.newsSM.setPingTransitions((spw_publish,))
+        self.sitemapUrl = '/' + self.portal.absolute_url(1) + \
+                          '/google-sitemaps'
         # Add testing document to portal
         self.my_doc = _createObjectByType('Document', self.portal, id='my_doc')
-        self.my_news = _createObjectByType('News Item', self.portal, id='my_news')
+        self.my_news = _createObjectByType('News Item', self.portal,
+                                           id='my_news')
 
     def testAutomatePinging(self):
@@ -32,7 +39,9 @@
             sys.stdout = back_out
 
-        self.assert_('Pinged %s sitemap to Google' % self.contentSM.absolute_url() in data,
+        self.assert_('Pinged %s sitemap to Google' \
+                     % self.contentSM.absolute_url() in data,
                      "Not pinged %s: '%s'" % (self.contentSM.id, data))
-        self.assert_('Pinged %s sitemap to Google' % self.newsSM.absolute_url() in data,
+        self.assert_('Pinged %s sitemap to Google' \
+                     % self.newsSM.absolute_url() in data,
                      "Not pinged %s: '%s'" % (self.newsSM.id, data))
 
@@ -47,14 +56,16 @@
             sys.stdout = back_out
 
-        self.assert_('Pinged %s sitemap to Google' % self.newsSM.absolute_url() in data,
+        self.assert_('Pinged %s sitemap to Google' \
+                     % self.newsSM.absolute_url() in data,
                      "Not pinged %s: '%s'" % (self.newsSM.id, data))
-        self.assert_(not 'Pinged %s sitemap to Google' % self.contentSM.absolute_url() in data,
+        self.assert_(not 'Pinged %s sitemap to Google' \
+                     % self.contentSM.absolute_url() in data,
                      "Pinged %s on news: '%s'" % (self.contentSM.id, data))
 
     def testPingingWithSetupForm(self):
         # Ping news and content sitemaps
-        formUrl = '/'+self.portal.absolute_url(1) + '/prefs_gsm_settings'
-        qs = 'smselected:list=%s&smselected:list=%s&form.button.Ping=1&form.submitted=1' % \
-             (self.contentSM.id, self.newsSM.id)
+        formUrl = '/' + self.portal.absolute_url(1) + '/prefs_gsm_settings'
+        qs = 'smselected:list=%s&smselected:list=%s&form.button.Ping=1' \
+             '&form.submitted=1' % (self.contentSM.id, self.newsSM.id)
 
         back_out, myout = sys.stdout, StringIO()
@@ -67,9 +78,10 @@
             sys.stdout = back_out
 
-        self.assert_('Pinged %s sitemap to Google' % self.contentSM.absolute_url() in data,
+        self.assert_('Pinged %s sitemap to Google' \
+                     % self.contentSM.absolute_url() in data,
                      "Not pinged %s: '%s'" % (self.contentSM.id, data))
-        self.assert_('Pinged %s sitemap to Google' % self.newsSM.absolute_url() in data,
+        self.assert_('Pinged %s sitemap to Google' \
+                     % self.newsSM.absolute_url() in data,
                      "Not pinged %s: '%s'" % (self.newsSM.id, data))
-
 
 
