-
Notifications
You must be signed in to change notification settings - Fork 0
/
day4_test.py
46 lines (34 loc) · 1.12 KB
/
day4_test.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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/local/bin/python3
import unittest
from day4 import is_valid_password
class TestStringMethods(unittest.TestCase):
def test_223450_is_not_valid_password(self):
p = 223450
outcome = is_valid_password(p)
self.assertFalse(outcome)
def test_123789_is_not_valid_password(self):
p = 123789
outcome = is_valid_password(p)
self.assertFalse(outcome)
def test_111111_is_not_valid_password(self):
p = 111111
outcome = is_valid_password(p)
self.assertFalse(outcome)
def test_112233_is_valid_password(self):
p = 112233
outcome = is_valid_password(p)
self.assertTrue(outcome)
def test_123444_is_not_valid_password(self):
p = 123444
outcome = is_valid_password(p)
self.assertFalse(outcome)
def test_111122_is_valid_password(self):
p = 111122
outcome = is_valid_password(p)
self.assertTrue(outcome)
def test_344455_is_valid_password(self):
p = 344455
outcome = is_valid_password(p)
self.assertTrue(outcome)
if __name__ == '__main__':
unittest.main()