def test_pretty_print_requirement_array_one_item( mock_print_requirement: MagicMock): mock_print_requirement.return_value = ["a", "b"] req = MagicMock() array = RequirementAnd([req]) # Run result = list(pretty_print.pretty_print_requirement_array(array, 3)) # Assert assert result == ["a", "b"] mock_print_requirement.assert_called_once_with(req, 3)
def test_pretty_print_requirement_array_combinable( mock_print_requirement: MagicMock, echoes_resource_database): mock_print_requirement.return_value = ["a", "b"] array = RequirementAnd([ ResourceRequirement(echoes_resource_database.item[0], 1, False), RequirementTemplate("Shoot Sunburst"), ]) # Run result = list(pretty_print.pretty_print_requirement_array(array, 3)) # Assert assert result == [(3, "Power Beam and Shoot Sunburst")] mock_print_requirement.assert_not_called()