tests.test_cli

Location: Pulp SmashAPI Documentationtests.test_cli

Unit tests for pulp_smash.cli.

class tests.test_cli.ClientTestCase(methodName='runTest')

Tests for pulp_smash.cli.Client.

test_default_response_handler()

Assert the default response handler checks return codes.

test_explicit_local_transport()

Assert it is possible to explicitly ask for a “local” transport.

test_explicit_pulp_system()

Assert it is possible to explicitly target a pulp cli PulpSystem.

test_explicit_response_handler()

Assert it is possible to explicitly set a response handler.

test_implicit_local_transport()

Assert it is possible to implicitly ask for a “local” transport.

test_implicit_pulp_system()

Assert it is possible to implicitly target a pulp cli PulpSystem.

class tests.test_cli.CodeHandlerTestCase(methodName='runTest')

Tests for pulp_smash.cli.code_handler().

classmethod setUpClass()

Call the function under test, and record inputs and outputs.

test_check_returncode()

Assert completed_proc.check_returncode() is not called.

test_input_returned()

Assert the passed-in completed_proc is returned.

class tests.test_cli.CompletedProcessTestCase(methodName='runTest')

Tests for pulp_smash.cli.CompletedProcess.

setUp()

Generate kwargs that can be used to instantiate a completed proc.

test_can_eval()

Assert __repr__() can be parsed by eval().

test_check_returncode_nonzero()

Call check_returncode when returncode is not zero.

test_check_returncode_zero()

Call check_returncode when returncode is zero.

test_init()

Assert all constructor arguments are saved as instance attrs.

class tests.test_cli.EchoHandlerTestCase(methodName='runTest')

Tests for pulp_smash.cli.echo_handler().

classmethod setUpClass()

Call the function under test, and record inputs and outputs.

test_check_returncode()

Assert completed_proc.check_returncode() is not called.

test_input_returned()

Assert the passed-in completed_proc is returned.

class tests.test_cli.GetHostnameTestCase(methodName='runTest')

Tests for pulp_smash.cli._get_hostname.

test_parsing()

Assert the function extracts hostnames as shown in its docstring.