def test_param_changer(self): """Tests that the parameter changer method in the Island class changes the parameters in the Landscape class. """ i = Island() new_param = {"f_max": 700} landscape = "J" i._param_changer(landscape, new_param) assert i.island_dict[( 0, 0)].landscape_parameters[landscape]["f_max"] == 700
def test_fodder_eaten_only_eat_available_fodder(self): """Test to show that fodder_eaten only returns the available fodder if the location contains less fodder than optimal fodder """ jungle_loc = (2, 7) Island._param_changer("J", {"f_max": 5}) i_sim = Island() s_1 = Herbivore(i_sim, jungle_loc) assert s_1.fodder_eaten() == 5