[1] | 1 | # |
---|
| 2 | # Tests for qPloneGoogleSitemaps |
---|
| 3 | # |
---|
[458] | 4 | import re, sys |
---|
| 5 | from urllib import urlencode |
---|
| 6 | from StringIO import StringIO |
---|
[1] | 7 | |
---|
[458] | 8 | from Products.Five import zcml |
---|
| 9 | from Products.Five import fiveconfigure |
---|
[1] | 10 | from Products.PloneTestCase import PloneTestCase |
---|
[458] | 11 | |
---|
| 12 | from Products.CMFPlone.utils import _createObjectByType |
---|
| 13 | |
---|
| 14 | import Products.qPloneGoogleSitemaps |
---|
| 15 | from Products.qPloneGoogleSitemaps.config import ping_googlesitemap |
---|
| 16 | |
---|
[1] | 17 | from XMLParser import parse, hasURL |
---|
[458] | 18 | Products.qPloneGoogleSitemaps.config.testing = 1 |
---|
[1] | 19 | |
---|
| 20 | PRODUCT = 'qPloneGoogleSitemaps' |
---|
| 21 | PRODUCTS = (PRODUCT,) |
---|
[458] | 22 | |
---|
| 23 | # Import configure.zcml for qPloneGoogleSitemaps |
---|
| 24 | fiveconfigure.debug_mode = True |
---|
| 25 | zcml.load_config('configure.zcml', Products.qPloneGoogleSitemaps) |
---|
| 26 | fiveconfigure.debug_mode = False |
---|
| 27 | |
---|
[1] | 28 | PloneTestCase.installProduct(PRODUCT) |
---|
[458] | 29 | PloneTestCase.setupPloneSite(extension_profiles=("Products.%s:default" % PRODUCT,)) |
---|
[1] | 30 | |
---|
[458] | 31 | class TestqPloneGoogleSitemapsInstallation(PloneTestCase.PloneTestCase): |
---|
| 32 | |
---|
| 33 | def afterSetUp(self): |
---|
| 34 | self.loginAsPortalOwner() |
---|
| 35 | |
---|
| 36 | def testType(self): |
---|
| 37 | pt = self.portal.portal_types |
---|
| 38 | self.assert_('Sitemap' in pt.objectIds(), |
---|
| 39 | 'No "Sitemap" type after installation') |
---|
| 40 | #Test views |
---|
| 41 | views = pt.getTypeInfo('Sitemap').view_methods |
---|
| 42 | self.assert_('sitemap.xml' in views, |
---|
| 43 | 'No "sitemap.xml" view for Sitemap type') |
---|
| 44 | self.assert_('mobile-sitemap.xml' in views, |
---|
| 45 | 'No "mobile-sitemap.xml" view for Sitemap type') |
---|
| 46 | self.assert_('news-sitemap.xml' in views, |
---|
| 47 | 'No "news-sitemap.xml" view for Sitemap type') |
---|
| 48 | |
---|
| 49 | def testGSMProperties(self): |
---|
| 50 | pp = self.portal.portal_properties |
---|
| 51 | |
---|
| 52 | # Test types_not_searched |
---|
| 53 | self.assert_("Sitemap" in pp['site_properties'].getProperty('types_not_searched'), |
---|
| 54 | 'No "Sitemap" added to types not searched on installation') |
---|
| 55 | # Test metaTypesNotToList |
---|
| 56 | self.assert_("Sitemap" in pp['navtree_properties'].getProperty('metaTypesNotToList'), |
---|
| 57 | 'No "Sitemap" added to types not to list on installation') |
---|
| 58 | |
---|
| 59 | # Test 'googlesitemap_properties' |
---|
| 60 | self.assert_('googlesitemap_properties' in pp.objectIds(), |
---|
| 61 | 'No "googlesitemap_properties" after installation') |
---|
| 62 | qsmprops = pp['googlesitemap_properties'] |
---|
| 63 | self.assert_(qsmprops.hasProperty('verification_filenames'), |
---|
| 64 | 'No "verification_filenames" property added on installation') |
---|
| 65 | |
---|
| 66 | def testSkins(self): |
---|
| 67 | ps = self.portal.portal_skins |
---|
| 68 | self.assert_('qPloneGoogleSitemaps' in ps.objectIds(), |
---|
| 69 | 'No "qPloneGoogleSitemaps" skin layer in portal_skins') |
---|
| 70 | self.assert_('qPloneGoogleSitemaps' in ps.getSkinPath(ps.getDefaultSkin()), |
---|
| 71 | 'No "qPloneGoogleSitemaps" skin layer in default skin') |
---|
| 72 | |
---|
| 73 | def testConfiglet(self): |
---|
| 74 | cp = self.portal.portal_controlpanel |
---|
| 75 | self.assert_([1 for ai in cp.listActionInfos() if ai['id']=='qPloneGoogleSitemaps'], |
---|
| 76 | 'No "qPloneGoogleSitemaps" configlet added to plone control panel') |
---|
| 77 | |
---|
| 78 | def testCatalog(self): |
---|
| 79 | catalog = self.portal.portal_catalog |
---|
| 80 | self.assert_('hasMobileContent' in catalog.indexes(), |
---|
| 81 | 'No "hasMobileContent" index in portal_catalog') |
---|
| 82 | |
---|
| 83 | |
---|
| 84 | class TestSitemapType(PloneTestCase.FunctionalTestCase): |
---|
| 85 | |
---|
| 86 | def afterSetUp(self): |
---|
| 87 | self.loginAsPortalOwner() |
---|
| 88 | self.auth = 'admin:admin' |
---|
| 89 | self.contentSM = _createObjectByType('Sitemap', self.portal, id='google-sitemaps') |
---|
| 90 | self.portal.portal_membership.addMember('admin', 'admin', ('Manager',), []) |
---|
| 91 | |
---|
| 92 | def testFields(self): |
---|
| 93 | field_ids = map(lambda x:x.getName(), self.contentSM.Schema().fields()) |
---|
| 94 | # test old Sitemap settings fields |
---|
| 95 | self.assert_('id' in field_ids) |
---|
| 96 | self.assert_('portalTypes' in field_ids) |
---|
| 97 | self.assert_('states' in field_ids) |
---|
| 98 | self.assert_('blackout_list' in field_ids) |
---|
| 99 | self.assert_('urls' in field_ids) |
---|
| 100 | self.assert_('pingTransitions' in field_ids) |
---|
| 101 | # test new sitemap type field |
---|
| 102 | self.assert_('sitemapType' in field_ids) |
---|
| 103 | |
---|
| 104 | def testSitemapTypes(self): |
---|
| 105 | sitemap_types = self.contentSM.getField('sitemapType').Vocabulary().keys() |
---|
| 106 | self.assert_('content' in sitemap_types) |
---|
| 107 | self.assert_('mobile' in sitemap_types) |
---|
| 108 | self.assert_('news' in sitemap_types) |
---|
| 109 | |
---|
| 110 | def testAutoSetLayout(self): |
---|
| 111 | response = self.publish('/%s/createObject?type_name=Sitemap' % \ |
---|
| 112 | self.portal.absolute_url(1), basic=self.auth) |
---|
| 113 | location = response.getHeader('location') |
---|
| 114 | newurl = location[location.find('/'+self.portal.absolute_url(1)):] |
---|
| 115 | |
---|
| 116 | msm_id = 'mobile_sitemap' |
---|
| 117 | form = {'id': msm_id, |
---|
| 118 | 'sitemapType':'mobile', |
---|
| 119 | 'portalTypes':['Document',], |
---|
| 120 | 'states':['published'], |
---|
| 121 | 'form_submit':'Save', |
---|
| 122 | 'form.submitted':1, |
---|
| 123 | } |
---|
| 124 | post_data = StringIO(urlencode(form)) |
---|
| 125 | response = self.publish(newurl, request_method='POST', stdin=post_data, basic=self.auth) |
---|
| 126 | msitemap = getattr(self.portal, msm_id) |
---|
| 127 | |
---|
| 128 | self.assertEqual(msitemap.defaultView(), 'mobile-sitemap.xml') |
---|
| 129 | |
---|
| 130 | def txestPingSetting(self): |
---|
| 131 | pwf = self.portal.portal_workflow['plone_workflow'] |
---|
| 132 | self.assertEqual(self.contentSM.getPingTransitions(), ()) |
---|
| 133 | |
---|
| 134 | self.contentSM.setPingTransitions(('plone_workflow#publish',)) |
---|
| 135 | self.assertEqual(self.contentSM.getPingTransitions(), ('plone_workflow#publish',)) |
---|
| 136 | self.assert_(ping_googlesitemap in pwf.scripts.keys(),"Not add wf script") |
---|
| 137 | |
---|
| 138 | |
---|
[1] | 139 | class TestqPloneGoogleSitemaps(PloneTestCase.FunctionalTestCase): |
---|
| 140 | |
---|
| 141 | def afterSetUp(self): |
---|
| 142 | self.loginAsPortalOwner() |
---|
| 143 | |
---|
| 144 | self.workflow = self.portal.portal_workflow |
---|
| 145 | self.auth = 'admin:admin' |
---|
[458] | 146 | _createObjectByType('Sitemap', self.portal, id='google-sitemaps') |
---|
[1] | 147 | self.sitemapUrl = '/'+self.portal.absolute_url(1) + '/google-sitemaps' |
---|
[458] | 148 | self.portal.portal_membership.addMember('admin', 'admin', ('Manager',), []) |
---|
| 149 | self.gsm_props = self.portal.portal_properties['googlesitemap_properties'] |
---|
[1] | 150 | |
---|
| 151 | # Add testing document to portal |
---|
| 152 | my_doc = self.portal.invokeFactory('Document', id='my_doc') |
---|
| 153 | self.my_doc = self.portal['my_doc'] |
---|
| 154 | self.my_doc.edit(text_format='plain', text='hello world') |
---|
| 155 | |
---|
| 156 | |
---|
[458] | 157 | |
---|
[1] | 158 | def testSitemap(self): |
---|
| 159 | sitemap = self.publish(self.sitemapUrl, self.auth).getBody() |
---|
| 160 | parsed_sitemap = parse(sitemap) |
---|
| 161 | start = parsed_sitemap['start'] |
---|
| 162 | data = parsed_sitemap['data'] |
---|
| 163 | self.assertEqual(len(start.keys()), 1) |
---|
| 164 | self.assert_('urlset' in start.keys()) |
---|
| 165 | |
---|
| 166 | self.workflow.doActionFor(self.my_doc, 'publish') |
---|
| 167 | |
---|
| 168 | sitemap = self.publish(self.sitemapUrl, self.auth).getBody() |
---|
| 169 | parsed_sitemap = parse(sitemap) |
---|
| 170 | start = parsed_sitemap['start'] |
---|
| 171 | data = parsed_sitemap['data'] |
---|
| 172 | self.assertEqual(len(start.keys()), 4) |
---|
| 173 | self.assert_('urlset' in start.keys()) |
---|
| 174 | self.assert_('url' in start.keys()) |
---|
| 175 | self.assert_('loc' in start.keys()) |
---|
| 176 | self.assert_('lastmod' in start.keys()) |
---|
| 177 | |
---|
| 178 | self.assert_(data[0] == self.my_doc.absolute_url(0), 'Incorect url') |
---|
| 179 | |
---|
[458] | 180 | def testVerificationFileCreation(self): |
---|
[1] | 181 | self.portal.gsm_create_verify_file('verif_file') |
---|
[458] | 182 | |
---|
[1] | 183 | vf_created = hasattr(self.portal, 'verif_file') |
---|
| 184 | self.assert_(vf_created, 'Verification file not created') |
---|
| 185 | |
---|
[458] | 186 | def testVerificationForm(self): |
---|
| 187 | verifyConfigUrl = '/'+self.portal.absolute_url(1) + '/prefs_gsm_verification' |
---|
| 188 | verif_config = self.publish(verifyConfigUrl, self.auth).getBody() |
---|
| 189 | rexp_input_acitve = re.compile('<input\s+name="verify_filename"\s+([^>]*)>', re.I|re.S) |
---|
| 190 | rexp_button_acitve = re.compile('<input\s+name="form.button.CreateFile"\s+([^>]*)>', re.I|re.S) |
---|
| 191 | rexp_delete_button = re.compile('<input\s+name="form.button.DeleteFile"\s+[^>]*>', re.I|re.S) |
---|
[1] | 192 | |
---|
[458] | 193 | input_acitve = rexp_input_acitve.search(verif_config) |
---|
| 194 | button_acitve = rexp_button_acitve.search(verif_config) |
---|
| 195 | delete_button = rexp_delete_button.match(verif_config) |
---|
| 196 | |
---|
| 197 | self.assert_(input_acitve and not 'disabled' in input_acitve.groups(1)) |
---|
| 198 | self.assert_(button_acitve and not 'disabled' in button_acitve.groups(1)) |
---|
| 199 | self.assert_(not delete_button) |
---|
| 200 | |
---|
| 201 | self.portal.gsm_create_verify_file('verif_file') |
---|
| 202 | |
---|
| 203 | input_acitve = rexp_input_acitve.search(verif_config) |
---|
| 204 | button_acitve = rexp_button_acitve.search(verif_config) |
---|
| 205 | delete_button = rexp_delete_button.match(verif_config) |
---|
| 206 | |
---|
| 207 | verif_config = self.publish(verifyConfigUrl, self.auth).getBody() |
---|
| 208 | self.assert_(input_acitve and not 'disabled' in input_acitve.groups(1)) |
---|
| 209 | self.assert_(not delete_button) |
---|
| 210 | |
---|
| 211 | def testMultiplyVerificationFiles(self): |
---|
| 212 | verifyConfigUrl = '/'+self.portal.absolute_url(1) + '/prefs_gsm_verification' |
---|
| 213 | |
---|
| 214 | form = {'verify_filename':'verif_file_1', |
---|
| 215 | 'form.button.CreateFile': 'Create verification file', |
---|
| 216 | 'form.submitted':1} |
---|
| 217 | post_data = StringIO(urlencode(form)) |
---|
| 218 | response = self.publish(verifyConfigUrl, request_method='POST', |
---|
| 219 | stdin=post_data, basic=self.auth) |
---|
| 220 | self.assertEqual(response.getStatus(), 200) |
---|
| 221 | self.assert_('verif_file_1' in self.gsm_props.getProperty('verification_filenames',[]), |
---|
| 222 | self.gsm_props.getProperty('verification_filenames',[])) |
---|
| 223 | |
---|
| 224 | form = {'verify_filename':'verif_file_2', |
---|
| 225 | 'form.button.CreateFile': 'Create verification file', |
---|
| 226 | 'form.submitted':1} |
---|
| 227 | post_data = StringIO(urlencode(form)) |
---|
| 228 | response = self.publish(verifyConfigUrl, request_method='POST', |
---|
| 229 | stdin=post_data, basic=self.auth) |
---|
| 230 | self.assertEqual(response.getStatus(), 200) |
---|
| 231 | self.assert_([1 for vf in ['verif_file','verif_file_2'] \ |
---|
| 232 | if vf in self.gsm_props.getProperty('verification_filenames',[])], |
---|
| 233 | self.gsm_props.getProperty('verification_filenames',[])) |
---|
| 234 | |
---|
| 235 | |
---|
[1] | 236 | class TestSettings(PloneTestCase.FunctionalTestCase): |
---|
| 237 | |
---|
| 238 | def afterSetUp(self): |
---|
| 239 | self.loginAsPortalOwner() |
---|
| 240 | |
---|
| 241 | self.workflow = self.portal.portal_workflow |
---|
| 242 | self.gsm_props = self.portal.portal_properties['googlesitemap_properties'] |
---|
| 243 | self.auth = 'admin:admin' |
---|
[458] | 244 | self.contentSM = _createObjectByType('Sitemap', self.portal, id='google-sitemaps') |
---|
| 245 | |
---|
[1] | 246 | self.sitemapUrl = '/'+self.portal.absolute_url(1) + '/google-sitemaps' |
---|
| 247 | |
---|
[458] | 248 | self.portal.portal_membership.addMember('admin', 'admin', ('Manager',), []) |
---|
[1] | 249 | |
---|
| 250 | # Add testing document to portal |
---|
| 251 | my_doc = self.portal.invokeFactory('Document', id='my_doc') |
---|
| 252 | self.my_doc = self.portal['my_doc'] |
---|
| 253 | self.my_doc.edit(text_format='plain', text='hello world') |
---|
| 254 | self.my_doc_url = self.my_doc.absolute_url() |
---|
| 255 | |
---|
| 256 | def testMetaTypeToDig(self): |
---|
| 257 | self.workflow.doActionFor(self.my_doc, 'publish') |
---|
| 258 | sitemap = self.publish(self.sitemapUrl, self.auth).getBody() |
---|
| 259 | self.assert_(hasURL(sitemap, self.my_doc_url)) |
---|
| 260 | |
---|
[458] | 261 | self.contentSM.setPortalTypes([]) |
---|
[1] | 262 | |
---|
| 263 | sitemap = self.publish(self.sitemapUrl, self.auth).getBody() |
---|
| 264 | self.assert_(not hasURL(sitemap, self.my_doc_url)) |
---|
| 265 | |
---|
[458] | 266 | self.contentSM.setPortalTypes(['Document']) |
---|
[1] | 267 | |
---|
| 268 | sitemap = self.publish(self.sitemapUrl, self.auth).getBody() |
---|
| 269 | self.assert_(hasURL(sitemap, self.my_doc_url)) |
---|
| 270 | |
---|
| 271 | def testStates(self): |
---|
| 272 | self.workflow.doActionFor(self.my_doc, 'publish') |
---|
[458] | 273 | self.contentSM.setStates(['visible']) |
---|
[1] | 274 | |
---|
| 275 | sitemap = self.publish(self.sitemapUrl, self.auth).getBody() |
---|
| 276 | self.assert_(not hasURL(sitemap, self.my_doc_url)) |
---|
| 277 | |
---|
[458] | 278 | self.contentSM.setStates(['published']) |
---|
[1] | 279 | |
---|
| 280 | sitemap = self.publish(self.sitemapUrl, self.auth).getBody() |
---|
| 281 | self.assert_(hasURL(sitemap, self.my_doc_url)) |
---|
| 282 | |
---|
| 283 | def test_blackout_entries(self): |
---|
| 284 | self.workflow.doActionFor(self.my_doc, 'publish') |
---|
[458] | 285 | self.contentSM.setBlackout_list((self.my_doc.getId(),)) |
---|
| 286 | |
---|
[1] | 287 | sitemap = self.publish(self.sitemapUrl, self.auth).getBody() |
---|
| 288 | self.assert_(not hasURL(sitemap, self.my_doc_url)) |
---|
| 289 | |
---|
[458] | 290 | self.contentSM.setBlackout_list([]) |
---|
[1] | 291 | sitemap = self.publish(self.sitemapUrl, self.auth).getBody() |
---|
| 292 | self.assert_(hasURL(sitemap, self.my_doc_url)) |
---|
| 293 | |
---|
| 294 | def test_regexp(self): |
---|
| 295 | self.workflow.doActionFor(self.my_doc, 'publish') |
---|
| 296 | sitemap = self.publish(self.sitemapUrl, self.auth).getBody() |
---|
| 297 | self.assert_(not hasURL(sitemap, self.portal.absolute_url())) |
---|
| 298 | |
---|
| 299 | regexp = "s/\/%s//"%self.my_doc.getId() |
---|
[458] | 300 | self.contentSM.setReg_exp([regexp]) |
---|
[1] | 301 | |
---|
| 302 | sitemap = self.publish(self.sitemapUrl, self.auth).getBody() |
---|
| 303 | self.assert_(hasURL(sitemap, self.portal.absolute_url())) |
---|
| 304 | |
---|
| 305 | def test_add_urls(self): |
---|
[458] | 306 | self.contentSM.setUrls(['http://w1', 'w2', '/w3']) |
---|
[1] | 307 | w1_url = 'http://w1' |
---|
| 308 | w2_url = self.portal.absolute_url() + '/w2' |
---|
| 309 | w3_url = self.portal.getPhysicalRoot().absolute_url() + '/w3' |
---|
| 310 | sitemap = self.publish(self.sitemapUrl, self.auth).getBody() |
---|
| 311 | |
---|
| 312 | self.assert_(hasURL(sitemap, w1_url)) |
---|
| 313 | self.assert_(hasURL(sitemap, w2_url)) |
---|
| 314 | self.assert_(hasURL(sitemap, w3_url)) |
---|
| 315 | |
---|
[458] | 316 | |
---|
| 317 | class TestPinging(PloneTestCase.FunctionalTestCase): |
---|
| 318 | |
---|
| 319 | def afterSetUp(self): |
---|
| 320 | self.loginAsPortalOwner() |
---|
| 321 | |
---|
| 322 | self.workflow = self.portal.portal_workflow |
---|
| 323 | self.gsm_props = self.portal.portal_properties['googlesitemap_properties'] |
---|
| 324 | self.auth = 'admin:admin' |
---|
| 325 | self.portal.portal_membership.addMember('admin', 'admin', ('Manager',), []) |
---|
| 326 | # Add sitemaps |
---|
| 327 | self.contentSM = _createObjectByType('Sitemap', self.portal, id='google-sitemaps') |
---|
| 328 | self.contentSM.setPingTransitions(('plone_workflow#publish',)) |
---|
| 329 | self.newsSM = _createObjectByType('Sitemap', self.portal, id='news-sitemaps') |
---|
| 330 | self.newsSM.setPortalTypes(('News Item','Document')) |
---|
| 331 | self.newsSM.setPingTransitions(('plone_workflow#publish',)) |
---|
| 332 | self.sitemapUrl = '/'+self.portal.absolute_url(1) + '/google-sitemaps' |
---|
| 333 | # Add testing document to portal |
---|
| 334 | my_doc = self.portal.invokeFactory('Document', id='my_doc') |
---|
| 335 | self.my_doc = self.portal['my_doc'] |
---|
| 336 | my_news = self.portal.invokeFactory('News Item', id='my_news') |
---|
| 337 | self.my_news = self.portal['my_news'] |
---|
| 338 | |
---|
| 339 | def testAutomatePinging(self): |
---|
| 340 | # 1. Check for pinging both sitemaps |
---|
| 341 | back_out, myout = sys.stdout, StringIO() |
---|
| 342 | sys.stdout = myout |
---|
| 343 | self.workflow.doActionFor(self.my_doc, 'publish') |
---|
| 344 | myout.seek(0) |
---|
| 345 | data = myout.read() |
---|
| 346 | sys.stdout = back_out |
---|
| 347 | self.assert_('Pinged %s sitemap to google' % self.contentSM.absolute_url() in data, |
---|
| 348 | "Not pinged %s: '%s'" % (self.contentSM.id, data)) |
---|
| 349 | self.assert_('Pinged %s sitemap to google' % self.newsSM.absolute_url() in data, |
---|
| 350 | "Not pinged %s: '%s'" % (self.newsSM.id, data)) |
---|
| 351 | |
---|
| 352 | # 2. Check for pinging only news-sitemap sitemaps |
---|
| 353 | back_out, myout = sys.stdout, StringIO() |
---|
| 354 | sys.stdout = myout |
---|
| 355 | self.workflow.doActionFor(self.my_news, 'publish') |
---|
| 356 | myout.seek(0) |
---|
| 357 | data = myout.read() |
---|
| 358 | sys.stdout = back_out |
---|
| 359 | |
---|
| 360 | self.assert_('Pinged %s sitemap to google' % self.newsSM.absolute_url() in data, |
---|
| 361 | "Not pinged %s: '%s'" % (self.newsSM.id, data)) |
---|
| 362 | self.assert_(not 'Pinged %s sitemap to google' % self.contentSM.absolute_url() in data, |
---|
| 363 | "Pinged %s on news: '%s'" % (self.contentSM.id, data)) |
---|
| 364 | |
---|
| 365 | def testPingingWithSetupForm(self): |
---|
| 366 | # Ping news and content sitemaps |
---|
| 367 | formUrl = '/'+self.portal.absolute_url(1) + '/prefs_gsm_settings' |
---|
| 368 | qs = 'smselected:list=%s&smselected:list=%s&form.button.Ping=1&form.submitted=1' % \ |
---|
| 369 | (self.contentSM.id, self.newsSM.id) |
---|
| 370 | |
---|
| 371 | back_out, myout = sys.stdout, StringIO() |
---|
| 372 | sys.stdout = myout |
---|
| 373 | response = self.publish("%s?%s" % (formUrl, qs), basic=self.auth) |
---|
| 374 | myout.seek(0) |
---|
| 375 | data = myout.read() |
---|
| 376 | sys.stdout = back_out |
---|
| 377 | |
---|
| 378 | self.assert_('Pinged %s sitemap to google' % self.contentSM.absolute_url() in data, |
---|
| 379 | "Not pinged %s: '%s'" % (self.contentSM.id, data)) |
---|
| 380 | self.assert_('Pinged %s sitemap to google' % self.newsSM.absolute_url() in data, |
---|
| 381 | "Not pinged %s: '%s'" % (self.newsSM.id, data)) |
---|
| 382 | |
---|
| 383 | |
---|
| 384 | |
---|
[1] | 385 | def test_suite(): |
---|
| 386 | from unittest import TestSuite, makeSuite |
---|
| 387 | suite = TestSuite() |
---|
[458] | 388 | suite.addTest(makeSuite(TestqPloneGoogleSitemapsInstallation)) |
---|
| 389 | suite.addTest(makeSuite(TestSitemapType)) |
---|
[1] | 390 | suite.addTest(makeSuite(TestqPloneGoogleSitemaps)) |
---|
| 391 | suite.addTest(makeSuite(TestSettings)) |
---|
[458] | 392 | suite.addTest(makeSuite(TestPinging)) |
---|
| 393 | |
---|
[1] | 394 | return suite |
---|
| 395 | |
---|
| 396 | if __name__ == '__main__': |
---|
| 397 | framework() |
---|