remove broken validate module

It can probably be fixed, but quite frankly I don't think this module is
even useful.
This commit is contained in:
mutantmonkey
2016-03-06 15:05:29 -08:00
parent 35e7b560ae
commit fcf22d7c38
2 changed files with 0 additions and 74 deletions

View File

@@ -1,31 +0,0 @@
"""
test_validate.py - tests for the validation module
author: mutantmonkey <mutantmonkey@mutantmonkey.in>
"""
import re
import unittest
from mock import MagicMock, Mock
from modules.validate import val
class TestValidate(unittest.TestCase):
def setUp(self):
self.phenny = MagicMock()
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))
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)