def test__should_check_post__already_checked_reject(self): sub_monitor = SubMonitor(MagicMock(), MagicMock(), MagicMock(), MagicMock(), MagicMock(), config=Config(redis_host='dummy')) post = Post(left_comment=True) self.assertFalse(sub_monitor.should_check_post(post, True, True))
def test__should_check_post__title_filter_accept(self): sub_monitor = SubMonitor(MagicMock(), MagicMock(), MagicMock(), MagicMock(), MagicMock(), config=Config(redis_host='dummy', supported_post_types=['image'])) post = Post(left_comment=False, post_type='image', title='some post') self.assertTrue(sub_monitor.should_check_post(post, True, True))
def test__should_check_post__reject_crosspost(self): sub_monitor = SubMonitor(MagicMock(), MagicMock(), MagicMock(), MagicMock(), MagicMock(), config=Config(redis_host='dummy', supported_post_types=['image'])) post = Post(left_comment=False, post_type='image', crosspost_parent='dkjlsd') self.assertFalse(sub_monitor.should_check_post(post, True, True))