Commits

Anonymous committed f7c993b

moar tests

  • Participants
  • Parent commits cce408c

Comments (0)

Files changed (1)

tests/test_models.py

 
         assert self.post.permalink == "http://localhost/post/1/s/testing/"
 
+    def test_popular(self):
+
+        assert Post.query.popular().count() == 1
+        self.post.score = 0
+        db.session.commit()
+        assert Post.query.popular().count() == 0
+
+    def test_deadpooled(self):
+
+        assert Post.query.deadpooled().count() == 0
+        self.post.score = 0
+        db.session.commit()
+        assert Post.query.deadpooled().count() == 1
+
     def test_tags(self):
 
         assert self.post.taglist == []