def test_zoo_pay_worker_no_budget(self): z = Zoo("Zoo", 200, 2, 2) z.hire_worker(Vet("John", 23, 100)) z.hire_worker(Keeper("Bill", 28, 150)) res = z.pay_workers() self.assertEqual( res, "You have no budget to pay your workers. They are unhappy")
def test_zoo_pay_worker_success(self): z = Zoo("Zoo", 1500, 2, 2) z.hire_worker(Vet("John", 23, 100)) z.hire_worker(Keeper("Bill", 28, 150)) res = z.pay_workers() self.assertEqual(z._Zoo__budget, 1250) self.assertEqual( res, "You payed your workers. They are happy. Budget left: 1250")
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())