Beispiel #1
0
 def test_isAdminEmployee(self):
     user1 = pL.insertUser("*****@*****.**")
     user2 = pL.insertUser("*****@*****.**")
     empuuid1 = pL.insertEmployee(user1, "Test", "Test", False)
     empuuid2 = pL.insertEmployee(user2, "Test", "Test", True)
     self.assertFalse(pL.isAdminEmployee(empuuid1))
     self.assertTrue(pL.isAdminEmployee(empuuid2))
Beispiel #2
0
 def test_getEmployees(self):
     user1 = pL.insertUser("*****@*****.**")
     user2 = pL.insertUser("*****@*****.**")
     empuuid1 = pL.insertEmployee(user1, "Test", "Test", False)
     empuuid2 = pL.insertEmployee(user2, "Test", "Test", False)
     presence = 0
     Empls = pL.getEmployees()
     for Empl in Empls:
         if Empl['uuid'] == empuuid1 or Empl['uuid'] == empuuid2:
             presence = presence + 1
     self.assertTrue(presence == 2)
Beispiel #3
0
 def test_updateEmployeeAdmin(self):
     user = pL.insertUser("*****@*****.**")
     empuuid = pL.insertEmployee(user, "Test", "Test", False)
     pL.updateEmployeeAdmin(True, empuuid)
     self.assertTrue(pL.isAdminEmployee(empuuid))
     pL.updateEmployeeAdmin(False, empuuid)
     self.assertFalse(pL.isAdminEmployee(empuuid))
Beispiel #4
0
 def test_getEmployeebyUUID(self):
     user = pL.insertUser("*****@*****.**")
     empuuid = pL.insertEmployee(user, "Test", "Test", False)
     self.assertTrue(pL.getEmployeebyUUID(empuuid) != None)
Beispiel #5
0
 def test_deleteEmployee(self):
     user = pL.insertUser("*****@*****.**")
     empuuid = pL.insertEmployee(user, "Test", "Test", False)
     pL.deleteEmployee(empuuid)
     self.assertTrue(pL.getEmployeebyUUID(empuuid) == None)
Beispiel #6
0
 def test_insertEmployee(self):
     user = pL.insertUser("*****@*****.**")
     empuuid = pL.insertEmployee(user, "Test", "Test", False)
     self.assertTrue(empuuid != None)