コード例 #1
0
ファイル: test_rule34.py プロジェクト: AaronCrosley/phenny
    def test_result(self):
        input = Mock(group=lambda x: 'python')
        rule34(self.phenny, input)

        out = self.phenny.reply.call_args[0][0]
        m = re.match('^!!NSFW!! -> http://rule34\.xxx/.* <- !!NSFW!!$', out,
                flags=re.UNICODE)
        self.assertTrue(m)
コード例 #2
0
    def test_result(self):
        self.input.group.return_value = 'python'
        rule34(self.phenny, self.input)

        out = self.phenny.reply.call_args[0][0]
        m = re.match('^!!NSFW!! -> http://rule34\.xxx/.* <- !!NSFW!!$',
                     out,
                     flags=re.UNICODE)
        self.assertTrue(m)
コード例 #3
0
    def test_result(self):
        input = Mock(group=lambda x: 'python')
        rule34(self.phenny, input)

        out = self.phenny.reply.call_args[0][0]
        m = re.match('^!!NSFW!! -> http://rule34\.xxx/.* <- !!NSFW!!$',
                     out,
                     flags=re.UNICODE)
        self.assertTrue(m)
コード例 #4
0
ファイル: test_rule34.py プロジェクト: AaronCrosley/phenny
    def test_none(self):
        input = Mock(group=lambda x: '__no_results_for_this__')
        rule34(self.phenny, input)

        self.phenny.reply.assert_called_once_with(
                "You just broke Rule 34! Better start uploading...")
コード例 #5
0
    def test_none(self):
        self.input.group.return_value = '__no_results_for_this__'
        rule34(self.phenny, self.input)

        self.phenny.reply.assert_called_once_with(
            "You just broke Rule 34! Better start uploading...")
コード例 #6
0
    def test_none(self):
        input = Mock(group=lambda x: '__no_results_for_this__')
        rule34(self.phenny, input)

        self.phenny.reply.assert_called_once_with(
            "You just broke Rule 34! Better start uploading...")