Module Expr Str Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore BinOpAdd Str SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str ListLoad Str Str Str Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Call NameLoad BinOpAdd NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str ImportFrom alias Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Str Str ListLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr CompareIn Str SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam defaults body ImportFrom alias Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Str Str ListLoad Str Str Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr CompareIn Str SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam defaults body ImportFrom alias Expr Call AttributeLoad NameLoad attr Str Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr Str NameStore body Assign AttributeStore AttributeLoad NameLoad attr attr ListLoad NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr Str Assign NameStore Dict Str Str Str Str Str Str Str Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list Call AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list Call AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore AttributeLoad Call NameLoad attr attr TupleLoad Str Str Assign AttributeStore NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list Call AttributeLoad NameLoad attr Str decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword BinOpBitOr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body ImportFrom alias Assign AttributeStore NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str keyword TupleLoad Num Num Num decorator_list Call AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam defaults body ImportFrom alias With Call AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body ImportFrom alias With Call AttributeLoad NameLoad attr Str body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body ImportFrom alias With Call AttributeLoad NameLoad attr Str body Assign NameStore Call NameLoad AttributeLoad NameLoad attr BinOpAdd AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr
N/A N/A Tests for certbot_apache.parser. N/A os N/A shutil N/A unittest N/A augeas N/A mock certbot errors certbot_apache.tests util BasicParserTest N/A N/A util ParserTest N/A N/A Apache Parser Test. setUp N/A N/A self N/A N/A N/A N/A N/A N/A super BasicParserTest self setUp N/A tearDown N/A N/A self N/A N/A N/A N/A N/A shutil rmtree N/A self temp_dir N/A N/A N/A shutil rmtree N/A self config_dir N/A N/A N/A shutil rmtree N/A self work_dir N/A test_find_config_root_no_root N/A N/A self N/A N/A N/A N/A N/A os remove N/A N/A N/A self parser loc N/A root N/A N/A N/A self assertRaises N/A errors NoInstallationError N/A N/A self parser _find_config_root N/A test_parse_file N/A N/A self N/A N/A N/A Test parse_file.

        certbot.conf is chosen as the test file as it will not be
        included during the normal course of execution.

         N/A file_path N/A N/A N/A os path join N/A self config_path not-parsed-by-default certbot.conf N/A N/A N/A N/A self parser _parse_file file_path N/A matches N/A N/A N/A N/A self parser aug match N/A /augeas/load/Httpd/incl [. ='%s'] file_path N/A N/A N/A self assertTrue matches N/A test_find_dir N/A N/A self N/A N/A N/A test N/A N/A N/A self parser find_dir Listen 80 N/A test2 N/A N/A N/A self parser find_dir documentroot N/A N/A N/A self assertEqual N/A len test 1 N/A N/A N/A self assertEqual N/A len test2 4 N/A test_add_dir N/A N/A self N/A N/A N/A aug_default N/A /files N/A N/A N/A self parser loc N/A default N/A N/A N/A N/A self parser add_dir aug_default AddDirective test N/A N/A N/A self assertTrue N/A N/A N/A self parser find_dir AddDirective test aug_default N/A N/A N/A N/A self parser add_dir aug_default AddList N/A 1 2 3 4 N/A matches N/A N/A N/A self parser find_dir AddList None aug_default N/A N/A i match N/A enumerate matches N/A N/A N/A N/A self assertEqual N/A N/A N/A N/A self parser aug get match N/A str N/A i 1 N/A test_add_dir_to_ifmodssl N/A N/A self N/A N/A N/A test add_dir_to_ifmodssl.

        Path must be valid before attempting to add to augeas

         certbot_apache.parser get_aug_path N/A N/A N/A N/A N/A self parser modules add mod_ssl.c N/A N/A N/A N/A self parser add_dir_to_ifmodssl N/A get_aug_path N/A N/A N/A self parser loc N/A default FakeDirective N/A 123 N/A matches N/A N/A N/A self parser find_dir FakeDirective 123 N/A N/A N/A self assertEqual N/A len matches 1 N/A N/A N/A self assertTrue N/A IfModule N/A matches N/A 0 N/A test_add_dir_to_ifmodssl_multiple N/A N/A self N/A N/A certbot_apache.parser get_aug_path N/A N/A N/A N/A N/A self parser modules add mod_ssl.c N/A N/A N/A N/A self parser add_dir_to_ifmodssl N/A get_aug_path N/A N/A N/A self parser loc N/A default FakeDirective N/A 123 456 789 N/A matches N/A N/A N/A self parser find_dir FakeDirective N/A N/A N/A self assertEqual N/A len matches 3 N/A N/A N/A self assertTrue N/A IfModule N/A matches N/A 0 N/A test_get_aug_path N/A N/A self N/A N/A certbot_apache.parser get_aug_path N/A N/A N/A self assertEqual /files/etc/apache N/A get_aug_path /etc/apache N/A test_set_locations N/A N/A self N/A N/A N/A N/A N/A mock patch certbot_apache.parser.os.path mock_path N/A N/A N/A N/A mock_path isfile side_effect N/A False False N/A results N/A N/A N/A self parser _set_locations N/A N/A N/A self assertEqual N/A results N/A default N/A results N/A listen N/A N/A N/A self assertEqual N/A results N/A default N/A results N/A name N/A test_update_runtime_variables N/A N/A self mock_cfg N/A N/A N/A N/A mock_cfg return_value ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex ssl-stapling: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/var/lock/apache2" mechanism=fcntl
Mutex watchdog-callback: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: TEST
Define: DUMP_RUN_CFG
Define: U_MICH
Define: TLS=443
Define: example_path=Documents/path
User: name="www-data" id=33 not_used
Group: name="www-data" id=33 not_used
 N/A expected_vars N/A TEST U_MICH TLS example_path 443 Documents/path N/A N/A N/A N/A self parser update_runtime_variables N/A N/A N/A self assertEqual N/A N/A self parser variables expected_vars N/A N/A N/A mock patch certbot_apache.parser.ApacheParser._get_runtime_cfg test_update_runtime_vars_bad_output N/A N/A self mock_cfg N/A N/A N/A N/A mock_cfg return_value Define: TLS=443=24 N/A N/A N/A N/A self parser update_runtime_variables N/A N/A mock_cfg return_value Define: DUMP_RUN_CFG
Define: TLS=443=24 N/A N/A N/A self assertRaises N/A errors PluginError N/A N/A self parser update_runtime_variables N/A N/A N/A mock patch certbot_apache.parser.ApacheParser._get_runtime_cfg test_update_runtime_vars_bad_ctl N/A N/A self mock_popen mock_const N/A N/A N/A N/A mock_popen side_effect OSError N/A N/A mock_const return_value nonexistent N/A N/A N/A self assertRaises N/A errors MisconfigurationError N/A N/A self parser update_runtime_variables N/A N/A N/A mock patch certbot_apache.constants.os_constant N/A N/A mock patch certbot_apache.parser.subprocess.Popen test_update_runtime_vars_bad_exit N/A N/A self mock_popen N/A N/A N/A N/A N/A N/A mock_popen communicate return_value N/A N/A N/A mock_popen returncode -1 N/A N/A N/A self assertRaises N/A errors MisconfigurationError N/A N/A self parser update_runtime_variables N/A N/A N/A mock patch certbot_apache.parser.subprocess.Popen N/A ParserInitTest N/A N/A util ApacheTest N/A setUp N/A N/A self N/A N/A N/A N/A N/A N/A super ParserInitTest self setUp N/A N/A self aug N/A N/A augeas Augeas flags N/A N/A N/A augeas Augeas NONE N/A N/A augeas Augeas NO_MODL_AUTOLOAD N/A tearDown N/A N/A self N/A N/A N/A N/A N/A shutil rmtree N/A self temp_dir N/A N/A N/A shutil rmtree N/A self config_dir N/A N/A N/A shutil rmtree N/A self work_dir N/A test_unparsable N/A N/A self mock_cfg N/A N/A certbot_apache.parser ApacheParser N/A N/A mock_cfg return_value Define: TEST N/A N/A N/A self assertRaises N/A errors PluginError ApacheParser N/A self aug N/A N/A N/A os path relpath N/A self config_path /dummy/vhostpath version N/A 2 2 22 N/A N/A N/A mock patch certbot_apache.parser.ApacheParser._get_runtime_cfg test_root_normalized N/A N/A self N/A N/A certbot_apache.parser ApacheParser N/A N/A N/A mock patch certbot_apache.parser.ApacheParser.update_runtime_variables N/A N/A path N/A N/A N/A os path join N/A self temp_dir debian_apache_2_4/////multiple_vhosts/../multiple_vhosts/apache2 N/A parser N/A ApacheParser N/A self aug path /dummy/vhostpath N/A N/A N/A self assertEqual N/A parser root N/A self config_path N/A test_root_absolute N/A N/A self N/A N/A certbot_apache.parser ApacheParser N/A N/A N/A mock patch certbot_apache.parser.ApacheParser.update_runtime_variables N/A N/A parser N/A ApacheParser N/A self aug N/A N/A N/A os path relpath N/A self config_path /dummy/vhostpath N/A N/A N/A self assertEqual N/A parser root N/A self config_path N/A test_root_no_trailing_slash N/A N/A self N/A N/A certbot_apache.parser ApacheParser N/A N/A N/A mock patch certbot_apache.parser.ApacheParser.update_runtime_variables N/A N/A parser N/A ApacheParser N/A self aug N/A N/A self config_path N/A N/A os path sep /dummy/vhostpath N/A N/A N/A self assertEqual N/A parser root N/A self config_path N/A N/A N/A N/A __name__ __main__ N/A N/A N/A N/A unittest main