pulp_2_tests.tests.platform.api_v2.test_content_applicability

Location: Pulp 2 TestsTestspulp_2_tests.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.pulp2.constants.CALL_REPORT_KEYS and pulp_smash.pulp2.constants.GROUP_CALL_REPORT_KEYS.) SeriesTestCase and ParallelTestCase test these two use cases, respectively.

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

Bases: unittest.case.TestCase

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_2_tests.tests.platform.api_v2.test_content_applicability.ParallelTestCase(methodName='runTest')

Bases: pulp_2_tests.tests.platform.api_v2.test_content_applicability._SuccessTestCase

Ask Pulp to regenerate content applicability for consumers and repos.

Do so in parallel. See pulp_2_tests.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_2_tests.tests.platform.api_v2.test_content_applicability.SeriesTestCase(methodName='runTest')

Bases: pulp_2_tests.tests.platform.api_v2.test_content_applicability._SuccessTestCase

Ask Pulp to regenerate content applicability for consumers and repos.

Do so in series. See pulp_2_tests.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.