예제 #1
0
 def test_entry_sitemap(self):
     sitemap = EntrySitemap()
     with self.assertNumQueries(1):
         items = sitemap.items()
         self.assertEqual(len(items), 2)
     self.assertEqual(
         sitemap.lastmod(items[0]).replace(microsecond=0),
         self.entry_2.last_update.replace(microsecond=0))
예제 #2
0
 def test_entry_sitemap(self):
     sitemap = EntrySitemap()
     with self.assertNumQueries(1):
         items = sitemap.items()
         self.assertEqual(len(items), 2)
     self.assertEqual(
         sitemap.lastmod(items[0]).replace(microsecond=0),
         self.entry_2.last_update.replace(microsecond=0))
예제 #3
0
 def test_empty_sitemap_issue_188(self):
     Entry.objects.all().delete()
     entry_sitemap = EntrySitemap()
     category_sitemap = CategorySitemap()
     author_sitemap = AuthorSitemap()
     tag_sitemap = TagSitemap()
     self.assertEquals(len(entry_sitemap.items()), 0)
     self.assertEquals(len(category_sitemap.items()), 0)
     self.assertEquals(len(author_sitemap.items()), 0)
     self.assertEquals(len(tag_sitemap.items()), 0)
예제 #4
0
 def test_empty_sitemap_issue_188(self):
     Entry.objects.all().delete()
     entry_sitemap = EntrySitemap()
     category_sitemap = CategorySitemap()
     author_sitemap = AuthorSitemap()
     tag_sitemap = TagSitemap()
     self.assertEquals(len(entry_sitemap.items()), 0)
     self.assertEquals(len(category_sitemap.items()), 0)
     self.assertEquals(len(author_sitemap.items()), 0)
     self.assertEquals(len(tag_sitemap.items()), 0)
예제 #5
0
 def test_entry_sitemap(self):
     sitemap = EntrySitemap()
     self.assertEquals(len(sitemap.items()), 2)
     self.assertEquals(sitemap.lastmod(self.entry_1),
                       self.entry_1.last_update)
예제 #6
0
 def test_entry_sitemap(self):
     sitemap = EntrySitemap()
     self.assertEquals(len(sitemap.items()), 2)
     self.assertEquals(sitemap.lastmod(self.entry_1),
                       self.entry_1.last_update)