pulp_smash.tests.platform.api_v2.test_content_applicability

Location: Pulp SmashAPI Documentationpulp_smash.tests.platform.api_v2.test_content_applicability

Test the API’s content applicability functionality.

When a user asks Pulp to regenerate content applicability, Pulp responds with a call report and starts executing tasks in series. Starting with Pulp 2.8, it is possible for a user to explicitly request that Pulp execute tasks in parallel instead. This functionality is only available for certain API calls, and when this is done, Pulp returns a group call report instead of a regular call report. (See pulp_smash.constants.CALL_REPORT_KEYS and pulp_smash.constants.GROUP_CALL_REPORT_KEYS.) SeriesTestCase and ParallelTestCase test these two use cases, respectively.

class pulp_smash.tests.platform.api_v2.test_content_applicability.FailureTestCase(methodName='runTest')

Fail to generate content applicability for consumers and repos.

classmethod setUpClass()

Make calls to the server and save the responses.

test_body()

Assert each response is JSON and doesn’t look like a call report.

test_status_code()

Assert each response has an HTTP 400 status code.

class pulp_smash.tests.platform.api_v2.test_content_applicability.ParallelTestCase(methodName='runTest')

Ask Pulp to regenerate content applicability for consumers and repos.

Do so in parallel. See pulp_smash.tests.platform.api_v2.test_content_applicability.

setUp()

Ensure this test only runs on Pulp 2.8 and later.

classmethod setUpClass()

Make calls to the server and save the responses.

test_body()

Assert each response is JSON and has a correct structure.

class pulp_smash.tests.platform.api_v2.test_content_applicability.SeriesTestCase(methodName='runTest')

Ask Pulp to regenerate content applicability for consumers and repos.

Do so in series. See pulp_smash.tests.platform.api_v2.test_content_applicability.

classmethod setUpClass()

Make calls to the server and save the responses.

test_body()

Assert each response is JSON and has a correct structure.