def test_object_created_all_attributes(self):
     p = student.Student('Brown', 'Ali', 'CIS')
     assert p.last_name == 'Brown'
     assert p.first_name == 'Ali'
     assert p.major == 'CIS'
     assert p.gpa == approx(0.0)
 def test_object_not_created_error_gpa(self):
     with self.assertRaises(ValueError):
         p = student.Student('Brown', 'Ali', 'CIS', 'abc')
 def test_object_not_created_error_major(self):
     with self.assertRaises(ValueError):
         p = student.Student('Brown', 'Ali', '123', '3.6')
 def test_object_not_created_error_fist_name(self):
     with self.assertRaises(ValueError):
         p = student.Student('Brown', '123', 'CIS', '3.6')
 def test_inital_all_attributes(self):
     person = student.Student('Brown', 'Ali', 'CIS', '3.8')  # this is not self.person from setUp, but local
     assert person.last_name == 'Brown'  # note no self here on person or assert
     assert person.first_name == 'Ali'
     assert person.major == 'CIS'
     assert person.gpa == '3.8'
 def setUp(self):
     self.student = student.Student('Hope', 'Bob', 'Speech', '3.6')