Exemplo n.º 1
0
 def test_with_magicmock(self):
     emp = Employee()
     emp.getCount = MagicMock(return_value=1500)
     print(emp.getCount())
     self.empdetail = EmpDetails(emp)
     self.assertEqual(self.empdetail.checkTotalEmployee(), "Too congested")
Exemplo n.º 2
0
 def setUpClass(cls):
     cls.emp1 = Employee(1, 'Sam', 3500)
     cls.emp2 = Employee(2, 'Joey', 2200)
Exemplo n.º 3
0
 def test_emp_details(self):
     emp = Employee()
     #print (emp.getCount())
     #print (self.empDetails.checkTotalEmployee())
     self.assertEqual(self.empDetails.checkTotalEmployee(),
                      "Feeling lonely")