validations_libs.tests.cli.test_common module

class validations_libs.tests.cli.test_common.TestCommon(methodName='runTest')[source]

Bases: unittest.case.TestCase

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_argparse_conditional_false(mock_argparse)[source]

Test if the imports are properly resolved based on presence of the SmartHelpFormatter in the namespace of the cliff._argparse. If the attribute isn’t in the namespace, and it shouldn’t be because the object is mocked to behave as a dictionary. The final ValidationHelpFormatter class should have thus have ‘cliff.command._SmartHelpFormatter’ in it’s inheritance chain. Otherwise it should raise ImportError.

test_read_cli_data_file_ioerror(mock_open)[source]
test_read_cli_data_file_with_example_file()[source]
test_read_cli_data_file_yaml_error(mock_yaml)[source]