-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_student.py
31 lines (21 loc) · 983 Bytes
/
test_student.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
import unittest
import student
class TestStudent(unittest.TestCase):
def test_fullname(self):
student1 = student.Student('jon', 'snow', 19)
student2 = student.Student('kayla', 'daniels', 20)
self.assertEqual(student1.fullname(), 'jon snow')
self.assertEqual(student2.fullname(), 'kayla daniels')
def test_email(self):
student1 = student.Student('jon', 'snow', 19)
student2 = student.Student('kayla', 'daniels', 20)
self.assertEqual(student1.email(), '[email protected]')
self.assertEqual(student2.email(), '[email protected]')
def test_student_id(self):
student1 = student.Student('jon', 'snow', 19)
student2 = student.Student('kayla', 'daniels', 20)
self.assertEqual(student1.student_id(), 'jon.snow.12557')
self.assertEqual(student2.student_id(),
'kayla.daniels.12557')
if __name__ == '__main__':
unittest.main()