Changeset 2942 in products
- Timestamp:
- Oct 29, 2010 9:57:34 AM (13 years ago)
- Location:
- quintagroup.plonegooglesitemaps/branches/blacklist/quintagroup/plonegooglesitemaps
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.plonegooglesitemaps/branches/blacklist/quintagroup/plonegooglesitemaps/content/sitemap.py
r2538 r2942 2 2 """ 3 3 4 import string 4 5 from zope.interface import implements, directlyProvides 5 6 … … 159 160 self.getField('pingTransitions').set(self, value) 160 161 162 def setBlackout_list(self, value, **kw): 163 """Clean-up whitespaces and empty lines.""" 164 import pdb;pdb.set_trace() 165 val = filter(None, map(string.strip, value)) 166 self.getField('blackout_list').set(self, val) 167 168 161 169 atapi.registerType(Sitemap, PROJECTNAME) -
quintagroup.plonegooglesitemaps/branches/blacklist/quintagroup/plonegooglesitemaps/tests/testSitemaps.py
r2741 r2942 76 76 self.assertEqual(isinstance(wftrans, atapi.DisplayList), True) 77 77 self.assertEqual("simple_publication_workflow#publish" in wftrans.keys(), True) 78 79 def testSettingBlackout(self): 80 bolist = ["path:./el1 "," ",""," id:index.html ","index_html"] 81 expect = ("path:./el1","id:index.html","index_html") 82 self.contentSM.edit(blackout_list=bolist) 83 value = self.contentSM.getBlackout_list() 84 self.assertTrue(value == expect, "Blackout list was not cleaned "\ 85 "up from whitespaces: %s" % str(value)) 78 86 79 87
Note: See TracChangeset
for help on using the changeset viewer.