-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtests.py
More file actions
49 lines (37 loc) · 1.49 KB
/
tests.py
File metadata and controls
49 lines (37 loc) · 1.49 KB
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
47
48
49
# Author : Clinton Lohr
# Date : 02/17/2023
# Course : CS 362 - Software Engineering II
# Assignment : TDD Hands On
from check_pwd import check_pwd
import unittest
class TestCase(unittest.TestCase):
# Verifies if an empty string returns False
def test_01(self):
input_str = ''
self.assertFalse(check_pwd(input_str))
# Verifies if a string of length less than 8 returns False
def test_02(self):
input_str = '1234567'
self.assertFalse(check_pwd(input_str))
# Verifies if a string of length greater than 20 returns False
def test_03(self):
input_str = 'abcdefghijklmnopqrstu'
self.assertFalse(check_pwd(input_str))
# Verifies if a string that does not contain at least one lowercase letter returns False
def test_04(self):
input_str = '123456789'
self.assertFalse(check_pwd(input_str))
# Verifies if a string that does not contain at least one uppercase letter returns False
def test_05(self):
input_str = '123435678u'
self.assertFalse(check_pwd(input_str))
# Verifies if a string that does not contain at least one digit returns False
def test_06(self):
input_str = 'aBcDeFgHi'
self.assertFalse(check_pwd(input_str))
# Verifies if a string that does not contain at least one special character returns False
def test_07(self):
input_str = '1234aBcD'
self.assertFalse(check_pwd(input_str))
if __name__ == '__main__':
unittest.main()