Commits

dan mackinlay committed e40b1bf

tests for the equality and happiness of path- and metadata-based dates

  • Participants
  • Parent commits b086589

Comments (0)

Files changed (1)

File tinkertest/test_metadata.py

     def test_metadata(self):
         utils.test = self
 
-        # create some posts
+        # create some posts with path-based dates
         for i in range(20):
             post.create("Post %d" % i, datetime.date(2010, 10, i + 1)).write(
                 content=" ".join("a" * 100))
+        # create some posts with metadata-based dates
+        for i in range(20):
+            post.create("Pathless Post %d" % i, datetime.date(2010, 11, i + 1), date_path=False).write(
+                content=" ".join("a" * 100))
 
         # ... and some pages
         for i in range(10):
 
     # check posts were identified as such
     posts = ["2010/10/%02d/post_%d" % (i + 1, i) for i in range(20)]
-    utils.test.assertEquals(set(posts), set(env.blog_posts))
+    pathless_posts = ["pathless_post_%d" %i for i in range(20)]
+    utils.test.assertEquals(set(posts + pathless_posts), set(env.blog_posts))
 
     # check pages were identified as such
     pages = ["pages/page_%d" % i for i in range(10)]