-
Notifications
You must be signed in to change notification settings - Fork 0
/
TestTask.py
24 lines (18 loc) · 1.17 KB
/
TestTask.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import unittest
from task import LearningTracker
class TestTask(unittest.TestCase):
lp_tracker = LearningTracker()
def test_verify_name(self):
self.assertIsNotNone(self.lp_tracker.verify_name("Jean-Claude"), "There is NOT match")
self.assertIsNotNone(self.lp_tracker.verify_name("O'Neill"), "There is NOT match")
self.assertIsNotNone(self.lp_tracker.verify_name("George"), "There is NOT match")
self.assertIsNotNone(self.lp_tracker.verify_name("ge'-ge"), "There is NOT match")
self.assertIsNotNone(self.lp_tracker.verify_name("Stanisław Oğuz"), "There is NOT match")
def test_verify_email(self):
self.assertIsNotNone(self.lp_tracker.verify_email("[email protected]"), "There is NOT match")
self.assertIsNotNone(self.lp_tracker.verify_email("[email protected]"), "There is NOT match")
self.assertIsNotNone(self.lp_tracker.verify_email("[email protected]"), "There is NOT match")
self.assertIsNotNone(self.lp_tracker.verify_email("test@test"), "There is NOT match")
self.assertIsNotNone(self.lp_tracker.verify_email("_#$%@t..%^&*"), "There is NOT match")
if __name__ == "__main__":
unittest.main()