test.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:hearthscan-bot 作者: d-schmidt 项目源码 文件源码
def test_AnswerMail_UserOnSpam(self):
        r = MagicMock()
        msg = MagicMock()
        msg.subreddit = None
        msg.author.name = 'user'
        msg.id = 'msgid'
        msg.distinguished = None
        pmUserCache = {'user' : 1234}

        helper = MagicMock()

        # test
        hsbot.answerPM(r, msg, pmUserCache, helper)

        self.assertEqual(r.method_calls, [], 'no reddit calls')
        self.assertEqual(helper.method_calls, [], 'no helper calls')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号