def create_test_resident(self): """ Creates a test resident for use in testing """ self.test_resident_info = ('*****@*****.**', 'Bob', 'Ross', 'RESIDENT') self.test_admin_info = ('*****@*****.**', 'Bob', 'Ross', 'ADMIN') self.test_user = UserService.create_user(*self.test_resident_info) self.test_admin = UserService.create_user(*self.test_admin_info) self.test_resident = ResidentService.get_resident_by_id( self.test_user.id) self.test_room = RoomService.create_room('1', 'Good', 'Single')
def test_get_all_rooms_multiple(self): """ Tests getting all rooms with 2 entries""" RoomService.create_room('6', 'Bad', 'Double') self.assertEqual(len(RoomService.get_all_rooms()), 2)
def create_test_room(self): """ Creates a room for use in testing """ self.test_room_info = ('5', 'Good', 'Single') self.test_room = RoomService.create_room(*self.test_room_info)