From 5fba105078286cebb299eaa59eec4f801b5bc84e Mon Sep 17 00:00:00 2001 From: François Schmidts Date: Tue, 19 May 2015 10:21:07 +0200 Subject: adding comments and tests --- tests/controllers/article.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'tests/controllers') diff --git a/tests/controllers/article.py b/tests/controllers/article.py index 51260546..5e873694 100644 --- a/tests/controllers/article.py +++ b/tests/controllers/article.py @@ -41,7 +41,11 @@ class ArticleControllerTest(BasePyaggTest): {'filters': [{"type": "regex", "pattern": ".*(pattern1|pattern2).*", "action on": "no match", - "action": "mark as favorite"}]}) + "action": "mark as favorite"}, + {"type": "simple match", + "pattern": "no see pattern", + "action on": "match", + "action": "mark as read"}]}) art1 = ArticleController(2).create( entry_id="thisisnotatest", feed_id=feed1['id'], @@ -85,7 +89,7 @@ class ArticleControllerTest(BasePyaggTest): art7 = ArticleController(2).create( entry_id="thisisnotatesteither", feed_id=feed3['id'], - title="garbage pattern3 garbage", + title="garbage no see pattern3 garbage", content="doesn't matter3", link="doesn't matter either3") art8 = ArticleController(2).create( @@ -107,7 +111,7 @@ class ArticleControllerTest(BasePyaggTest): self.assertFalse(art5.like) self.assertFalse(art6.readed) self.assertFalse(art6.like) - self.assertFalse(art7.readed) + self.assertTrue(art7.readed) self.assertTrue(art7.like) self.assertFalse(art8.readed) self.assertTrue(art8.like) -- cgit