tests.test_pulp2_utils¶
Location: Pulp Smash → API Documentation → tests.test_pulp2_utils
Unit tests for pulp_smash.pulp2.utils.
-
class
tests.test_pulp2_utils.BaseAPITestCaseTestCase(methodName='runTest')¶ Bases:
unittest.case.TestCaseTest
pulp_smash.pulp2.utils.BaseAPITestCase.-
classmethod
setUpClass()¶ Define a child class. Call setup and teardown methods on it.
We define a child class in order to avoid altering
pulp_smash.pulp2.utils.BaseAPITestCase. Calling class methods on it would do so.
-
test_set_up_class()¶ Assert method
setUpClasscreates correct class attributes.Verify that the method creates attributes named
cfgandresources.
-
test_tear_down_class()¶ Call method
tearDownClass, and assert it deletes each resource.pulp_smash.api.Client.delete()should be called once for each resource listed inresources, and once forpulp_smash.pulp2.constants.ORPHANS_PATH.
-
classmethod
-
class
tests.test_pulp2_utils.GetBrokerTestCase(methodName='runTest')¶ Bases:
unittest.case.TestCaseTest
pulp_smash.pulp2.utils.get_broker().-
test_failure()¶ Fail to generate a broker service management object.
Assert that
pulp_smash.exceptions.NoKnownBrokerErroris raised if the function cannot find a broker.
-
test_success()¶ Successfully generate a broker service management object.
Assert that:
get_broker(…)returns a string.- The
cfgargument is passed to the service object. - The “qpidd” broker is the preferred broker.
-
-
class
tests.test_pulp2_utils.PulpAdminLoginTestCase(methodName='runTest')¶ Bases:
unittest.case.TestCaseTest
pulp_smash.pulp2.utils.pulp_admin_login().-
test_run()¶ Assert the function executes
cli.Client.run.
-
-
class
tests.test_pulp2_utils.SearchUnitsTestCase(methodName='runTest')¶ Bases:
unittest.case.TestCaseTest
pulp_smash.pulp2.utils.search_units().-
test_defaults()¶ Verify that default parameters are correctly set.
-
-
class
tests.test_pulp2_utils.SyncRepoTestCase(methodName='runTest')¶ Bases:
unittest.case.TestCaseTest
pulp_smash.pulp2.utils.sync_repo().-
test_post()¶ Assert the function makes an HTTP POST request.
-
-
class
tests.test_pulp2_utils.UploadImportErratumTestCase(methodName='runTest')¶ Bases:
unittest.case.TestCaseTest
pulp_smash.pulp2.utils.upload_import_erratum().-
test_post()¶ Assert the function makes an HTTP POST request.
-
-
class
tests.test_pulp2_utils.UploadImportUnitTestCase(methodName='runTest')¶ Bases:
unittest.case.TestCaseTest
pulp_smash.pulp2.utils.upload_import_unit().-
test_post()¶ Assert the function makes an HTTP POST request.
-