Example #1
0
    def test_invalid(self):
        url = 'http://microsoft.com/'
        input = Mock(group=lambda x: url)
        val(self.phenny, input)

        out = self.phenny.reply.call_args[0][0]
        m = re.match('^{0} is Invalid \(\d+ errors\)'.format(url),
                out, flags=re.UNICODE)
        self.assertTrue(m)
Example #2
0
    def test_valid(self):
        url = 'http://validator.w3.org/'
        input = Mock(group=lambda x: url)
        val(self.phenny, input)

        self.phenny.reply.assert_called_once_with('{0} is Valid'.format(url))
Example #3
0
    def test_valid(self):
        url = 'http://vtluug.org/'
        input = Mock(group=lambda x: url)
        val(self.phenny, input)

        self.phenny.reply.assert_called_once_with('{0} is Valid'.format(url))