コード例 #1
0
ファイル: test_remind.py プロジェクト: evo938938/gracie
    def test_remind_nomsg(self):
        secs = 5
        self.input.sender = '#testsworth'
        self.input.nick = 'Testsworth'
        self.input.bytes = '.in {0} seconds'.format(secs)

        remind.remind(self.phenny, self.input)
        self.phenny.reply.assert_called_once_with("Okay, will remind in {0}"
                " secs".format(secs))
        time.sleep(secs + 1)
        self.phenny.msg.assert_called_once_with(self.input.sender, self.input.nick + '!')
コード例 #2
0
ファイル: test_remind.py プロジェクト: vtluug/phenny
    def test_remind(self):
        secs = 5
        input = Mock(sender='#testsworth', nick='Testsworth',
                bytes='.in {0} seconds TEST REMIND'.format(secs))

        remind.remind(self.phenny, input)
        self.phenny.reply.assert_called_once_with("Okay, will remind in {0}"\
                " secs".format(secs))

        time.sleep(secs + 1)
        self.phenny.msg.assert_called_once_with(input.sender,
                input.nick + ': TEST REMIND')