def setUp(self): users = pL.getUsers() guests = pL.getGuests() for g in guests: if g['last_name'] == "Test": pL.deleteGuest(g['uuid']) for u in users: if str.startswith(u['email'], "GuestUserTest"): pL.deleteUser(u['uuid'])
def setUp(self): Employees = pL.getEmployees() for Employee in Employees: if str.startswith(Employee['last_name'], "Test"): pL.deleteEmployee(Employee['uuid']) Users = pL.getUsers() for User in Users: if str.startswith(User['email'], "TestingEmail"): pL.deleteUser(User['uuid'])
def setUp(self): Sessions = pL.getSessions() for Session in Sessions: if Session['token'] == "TOKENABCDEF": pL.deleteSession(Session['uuid']) Users = pL.getUsers() for User in Users: if str.startswith(User['email'], "SessionUserTest"): pL.deleteUser(User['uuid'])
def setUp(self): Ts = pL.getTransactions() for T in Ts: pL.deleteTransaction(T['uuid']) Users = pL.getUsers() for user in Users: if str.startswith(user['email'], "TestingEmail"): pL.deleteUser(user['uuid']) Rooms = pL.getRooms() for room in Rooms: if str.startswith(room['floor'], "Test"): pL.deleteRoom(room['uuid']) self._user = pL.insertUser("*****@*****.**") self._room = pL.insertRoom("Test Room", "12", "Test")
def setUp(self): RSR = pL.getMaintenanceRequests() for rsr in RSR: pL.deleteMaintenanceRequest(rsr['uuid']) Users = pL.getUsers() for user in Users: if str.startswith(user['email'], "TestingEmail"): pL.deleteUser(user['uuid']) Rooms = pL.getRooms() for room in Rooms: if str.startswith(room['floor'], "Test"): pL.deleteRoom(room['uuid']) self._user = pL.insertUser("*****@*****.**") self._room = pL.insertRoom("Test Room", "12", "Test")
def setUp(self): RSR = pL.getRoomServiceRequests() for rsr in RSR: pL.deleteRoomServiceRequest(rsr['uuid']) Users = pL.getUsers() for user in Users: if str.startswith(user['email'], "TestingEmail"): pL.deleteUser(user['uuid']) Rooms = pL.getRooms() for room in Rooms: if str.startswith(room['floor'], "Test"): pL.deleteRoom(room['uuid']) TPs = pL.getRoomServiceItems() for TP in TPs: if str.startswith(TP['name'], "Test"): pL.deleteRoomServiceItem(TP['uuid']) self._user = pL.insertUser("*****@*****.**") self._room = pL.insertRoom("Test Room", "12", "Test") self._type = pL.insertRoomServiceItem("Test Room Service Item 6", "Description", "3.50", None, "0000123")
def setUp(self): #remove all used users for next test run users = pL.getUsers() for user in users: if str.startswith(user['email'], "User"): pL.deleteUser(user['uuid'])
def test_deleteUser(self): # attempt to delete a user uuid = pL.insertUser("*****@*****.**") pL.deleteUser(uuid) self.assertTrue(pL.getUserbyUUID(uuid) == None)