示例#1
0
 def testChangeSalaryLessZero(self):
     employee = Employee('Ivan Ivanov', date(1901, 1, 1), salary=100)
     with self.assertRaises(ValueError):
         employee.change_salary(-200)
示例#2
0
 def testChangeSalaryMinus(self):
     employee = Employee('Ivan Ivanov', date(1901, 1, 1), salary=100)
     employee.change_salary(-100)
     self.assertEqual(0, employee.salary)