Changeset 2399 in products for quintagroup.plonegooglesitemaps/trunk/quintagroup
- Timestamp:
- May 27, 2010 4:28:10 PM (14 years ago)
- Location:
- quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/browser/newssitemapview.py
r2398 r2399 15 15 ('publication_date', lambda x:DateTime(x.EffectiveDate).strftime("%Y-%m-%d")), 16 16 ('keywords', lambda x:', '.join(x.Subject)), 17 ('title', lambda x:x.Title), 17 18 ('name', lambda x:reTrailingParenthtical.sub("",x.Title)), 18 ('title', lambda x:x.Title),19 19 ('language', lambda x:x.Language), 20 20 ('access', lambda x:x.gsm_access), -
quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/browser/templates/newssitemapview.pt
r2398 r2399 13 13 <n:language tal:content="result/language">news language</n:language> 14 14 </n:publication> 15 <n:title tal:content="result/title">Full title of the news item</n:title>16 <n:publication_date tal:content="result/publication_date">2006-08-14</n:publication_date>17 <n:keywords tal:content="result/keywords">Business, Mergers, Acquisitions</n:keywords>18 15 <n:access tal:condition="result/access" tal:content="result/access"> 19 16 Whether an article is available to all readers</n:access> 20 17 <n:genres tal:condition="result/genres" tal:content="result/genres"> 21 18 Specifies one or more properties for an article</n:genres> 19 <n:publication_date tal:content="result/publication_date">2006-08-14</n:publication_date> 20 <n:title tal:content="result/title">Full title of the news item</n:title> 21 <n:keywords tal:content="result/keywords">Business, Mergers, Acquisitions</n:keywords> 22 22 </n:news> 23 23 </url> -
quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/tests/testNewsSitemaps.py
r2397 r2399 60 60 61 61 def test_no_naccess(self): 62 open("/tmp/news.sm.1.xml","w").write(self.sitemap)63 62 self.assert_("n:access" not in self.start.keys()) 64 63 … … 71 70 self.my_news.reindexObject() 72 71 self.reParse() 73 open("/tmp/news.sm.2.xml","w").write(self.sitemap)74 72 self.assert_("n:access" in self.start.keys()) 75 73 self.assert_("Registration" in self.data, "No 'Registration' in data") 76 74 77 75 def test_ngenres(self): 78 # Test when access present76 # Test when genres present 79 77 self.my_news._setProperty("gsm_genres", "PressRelease") 80 78 self.my_news.reindexObject() 81 79 self.reParse() 82 open("/tmp/news.sm.3.xml","w").write(self.sitemap)83 80 self.assert_("n:genres" in self.start.keys()) 84 81 self.assert_("PressRelease" in self.data, "No 'PressRelease' in data")
Note: See TracChangeset
for help on using the changeset viewer.