mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-16 21:12:13 +00:00
29 lines
610 B
Python
29 lines
610 B
Python
__author__ = 'ghost'
|
|
|
|
import unittest
|
|
from importer import fix_email
|
|
|
|
|
|
class EmailFixerTest(unittest.TestCase):
|
|
def test_correct(self):
|
|
e = fix_email("tom@ghost.uk.net")
|
|
self.assertEqual(e, "tom@ghost.uk.net")
|
|
|
|
def test_partial(self):
|
|
e = fix_email("psytp")
|
|
self.assertEqual(e, "psytp@nottingham.ac.uk")
|
|
|
|
def test_none(self):
|
|
old = None
|
|
new = fix_email(old)
|
|
self.assertEqual(old, new)
|
|
|
|
def test_empty(self):
|
|
old = ""
|
|
new = fix_email(old)
|
|
self.assertEqual(old, new)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|