pulp_smash.tests.pulp2.utils

Location: Pulp SmashAPI Documentationpulp_smash.tests.pulp2.utils

Utility functions for Pulp 2 tests.

pulp_smash.tests.pulp2.utils.get_unit_types()

Tell which unit types are supported by the target Pulp server.

Each Pulp plugin adds one (or more?) content unit types to Pulp, and each content unit type has a unique identifier. For example, the Python plugin [1] adds the Python content unit type [2], and Python content units have an ID of python_package. This function queries the server and returns those unit type IDs.

Returns:A set of content unit type IDs. For example: {'ostree', 'python_package'}.
[1]http://docs.pulpproject.org/plugins/pulp_python/
[2]http://docs.pulpproject.org/plugins/pulp_python/reference/python-type.html
pulp_smash.tests.pulp2.utils.require_issue_3159()

Skip tests if Fedora 27 is under test and Pulp #3159 is open.

pulp_smash.tests.pulp2.utils.require_pulp_2()

Skip tests if Pulp 2 isn’t under test.

pulp_smash.tests.pulp2.utils.require_unit_types(required_unit_types)

Skip tests if one or more unit types aren’t supported.

Parameters:required_unit_types – A set of unit types IDs, e.g. {'ostree'}.