示例#1
0
 def test_Objecttype_sitemap(self):
     sitemap = ObjecttypeSitemap()
     self.assertEquals(len(sitemap.items()), 1)
     self.assertEquals(sitemap.lastmod(self.Objecttype),
                       self.gbobject_2.creation_date)
     self.assertEquals(sitemap.lastmod(Objecttype.objects.create(
         title='New', slug='new')), None)
     self.assertEquals(sitemap.priority(self.Objecttype), '1.0')
示例#2
0
文件: sitemaps.py 项目: PhiTheta/ISON
 def test_Objecttype_sitemap(self):
     sitemap = ObjecttypeSitemap()
     self.assertEquals(len(sitemap.items()), 1)
     self.assertEquals(sitemap.lastmod(self.Objecttype),
                       self.gbobject_2.creation_date)
     self.assertEquals(
         sitemap.lastmod(Objecttype.objects.create(title='New',
                                                   slug='new')), None)
     self.assertEquals(sitemap.priority(self.Objecttype), '1.0')
示例#3
0
 def test_Objecttype_sitemap_zero_division_error(self):
     Gbobject.objects.all().delete()
     Objecttype_sitemap = ObjecttypeSitemap()
     Objecttype_sitemap.items()
     self.assertEquals(Objecttype_sitemap.priority(self.Objecttype), '0.5')
示例#4
0
文件: sitemaps.py 项目: PhiTheta/ISON
 def test_Objecttype_sitemap_zero_division_error(self):
     Gbobject.objects.all().delete()
     Objecttype_sitemap = ObjecttypeSitemap()
     Objecttype_sitemap.items()
     self.assertEquals(Objecttype_sitemap.priority(self.Objecttype), '0.5')