def create_crewman():

        crewman_name = input("Name your crew member")

        crewman = Staff(crewman_name)

        print(repr(crewman))

        available_stations = list()

        for station in stations_list:
            station.retrieve_bonuses()
            print(station)
            pop_cap = station.section_cap
            current_pop = len(station.staff_list)

            if current_pop < pop_cap:
                available_stations.append(station)

        print("available stations:")

        options_dict: Dict = dict()

        for counter, station in enumerate(available_stations):
            options_dict[counter] = station
            print("{}) {}".format(counter, station.station_name))

        chosen_option: int = int(input("Input the station number"))
        chosen_station = options_dict[chosen_option]
        chosen_station.staff_list.append(crewman)
 def test_room_remove_person(self):
     room = Office('Iroko')
     person = Staff('Anthiny', 'Nandaa')
     room.allocate(person)
     self.assertNotEqual(room.people, [])
     room.remove_person(person)
     self.assertEqual(room.people, [])
     self.assertEqual(room.remove_person(person), False)
Beispiel #3
0
    def setUp(self):
        ##### Staff #####
        self.staff1 = Staff("Bob", 1, 21, 4, Job.CHEF, [FoodAbility.CHINESE])
        self.staff2 = Staff("Barbera", 10, 92, 4, Job.DOORMAN,
                            [FoodAbility.INDIAN])
        self.staff3 = Staff("George", 100, 12, 4, Job.CHEF, [FoodAbility.NONE])

        ##### Drinks #####
        self.wine = Drink("Wine", 899, 67)
        self.cola = Drink("Cola", 199, 0)
        self.vodka = Drink("Vodka", 299, 0)

        ##### Food #####
        self.food = Food("Soup", 399, 2, None)
        self.food_1 = Food("Curry", 399, 2, FoodAbility.INDIAN)
        self.food_not = Food("Chinese", 899, 2, FoodAbility.CHINESE)

        ##### Songs #####

        self.song = [
            Song("Cafo", "Animals as Leaders", 2009, Genre.ALTERNATIVE_METAL),
            Song("Electric Sunrise", "Plini", 2016, Genre.PROG_METAL),
            Song("Pastures", "Plini", 2016, Genre.PROG_METAL)
        ]

        ##### Duke Box #####
        self.dukebox = DukeBox(self.song, 99, [])

        ##### Bar #####
        self.bar = Bar(self.dukebox, [self.staff1, self.staff2, self.staff3],
                       [self.cola, self.wine], [self.food, self.food_1])

        self.bar.drinks_list[0].add_stock(60)
        self.bar.drinks_list[1].add_stock(90)
        self.bar.food_list[0].add_stock(100)
        self.bar.food_list[1].add_stock(70)
    def setUp(self):

        ##### Staff #####
        self.staff = [
            Staff("Bob", 1, 21, 4, Job.CHEF, [FoodAbility.CHINESE]),
            Staff("Barbera", 10, 92, 4, Job.DOORMAN, [FoodAbility.INDIAN]),
            Staff("George", 100, 12, 4, Job.CHEF, [FoodAbility.NONE]),
            Staff("Margery", 100, 30, 4, Job.BARMAN, [FoodAbility.NONE])
        ]

        ##### Drinks #####
        self.wine = Drink("Wine", 899, 67)
        self.cola = Drink("Cola", 199, 0)
        self.vodka = Drink("Vodka", 299, 0)

        ##### Food #####
        self.food = Food("Soup", 399, 2, None)
        self.food_1 = Food("Curry", 399, 2, FoodAbility.INDIAN)
        self.food_not = Food("Chinese", 899, 2, FoodAbility.CHINESE)

        ##### Songs #####
        self.song = [
            Song("Cafo", "Animals as Leaders", 2009, Genre.ALTERNATIVE_METAL),
            Song("Electric Sunrise", "Plini", 2016, Genre.PROG_METAL),
            Song("Pastures", "Plini", 2016, Genre.PROG_METAL)
        ]

        ##### Duke Box #####
        self.dukebox = DukeBox(self.song, 99, [])

        ##### Bar #####
        self.bar = Bar(self.dukebox, [self.staff[0], self.staff[3]],
                       [self.cola, self.wine], [self.food, self.food_1])

        self.bar.drinks_list[0].add_stock(60)
        self.bar.drinks_list[1].add_stock(90)
        self.bar.food_list[0].add_stock(100)
        self.bar.food_list[1].add_stock(70)

        ##### Bathroom #####

        self.bath = Bath("Bath Extra", 7, 100, 10)
        self.toilet = Toilet("ToLet Amaze", 7, 100, 10)
        self.sink = Sink("sink Extra", 7, 100, 10)

        self.bathroom = Bathroom(self.sink, self.bath, self.toilet, None)

        ##### Rooms #####
        self.rooms = [
            Room([self.bathroom], self.dukebox, RoomType.SINGLE),
            Room([self.bathroom], self.dukebox, RoomType.DOUBLE),
            Room([self.bathroom], self.dukebox, RoomType.TRIPLE),
            Room([self.bathroom], self.dukebox, RoomType.DELUXE)
        ]

        ##### Customers #####

        self.customers = [
            Customer("Jeff", 24, 80, 70, 60, 10, 0, 90, None, 100),
            Customer("Margaret", 15, 83, 70, 99, 10, 0, 90, None, 200),
            Customer("Dorothy", 47, 83, 70, 99, 10, 0, 90, None, 200),
            Customer("Humphrey", 15, 83, 70, 14, 10, 0, 90, None, 200)
        ]
        self.customers[1].set_partner(self.customers[0])

        ##### Building #####
        self.building = Building(self.rooms, self.bar, self.customers,
                                 self.staff)
Beispiel #5
0
 def setUp(self):
     self.staff_member = Staff("staff_name", 2, 3, ["bob", "george"],
                               "Nothing")
 def test_room_allocate_fails_when_person_type_is_staff_and_room_type_is_L(
         self):
     room = LivingSpace('Iroko')
     person = Staff('Anthony', 'Nandaa')
     self.assertEqual(room.allocate(person), False)
     self.assertEqual(room.people, [])
 def test_room_allocate_able(self):
     room = Office('Iroko')
     person = Staff('Anthiny', 'Nandaa')
     room.allocate(person)
     self.assertEqual(room.allocate_able(person), False)
 def test_room_people_list_with_room_name(self):
     room = Office('Iroko')
     person = Staff('Anthiny', 'Nandaa')
     room.allocate(person)
     data = room.people_list_with_room_name(False)
     self.assertNotEqual(data, [])
 def test_room_allocate_fails_when_is_filled(self):
     room = Office('Iroko')
     person = Staff('Anthiny', 'Nandaa')
     room.capacity = 0
     self.assertEqual(room.allocate(person), False)
Beispiel #10
0
 def test_room_allocate_staff(self):
     room = Office('Iroko')
     person = Staff('Anthony', 'Nandaa')
     room.allocate(person)
     self.assertNotEqual(room.people, [])
     self.assertEqual(type(person), type(room.people[0]))