def test_zoo_fire_worker_success(self): z = Zoo("Zoo", 1500, 1, 1) z.hire_worker(Keeper("K", 45, 100)) res = z.fire_worker("K") self.assertEqual(res, "K fired successfully") self.assertEqual(z.workers, [])
def test_zoo_fire_worker_unsuccessful(self): z = Zoo("Zoo", 1500, 1, 1) res = z.fire_worker("K") self.assertEqual(res, "There is no K in the zoo") self.assertEqual(z.workers, [])
Caretaker("Bill", 21, 68), Caretaker("Marie", 32, 105), Caretaker("Stacy", 35, 140), Vet("Peter", 40, 300), Vet("Kasey", 37, 280), Vet("Sam", 29, 220) ] # Adding all animals for i in range(len(animals)): animal = animals[i] price = prices[i] print(zoo.add_animal(animal, price)) # Adding all workers for worker in workers: print(zoo.hire_worker(worker)) # Tending animals print(zoo.tend_animals()) # Paying keepers print(zoo.pay_workers()) # Fireing worker print(zoo.fire_worker("Adam")) # # Printing statuses print(zoo.animals_status()) print(zoo.workers_status())