Module ImportFrom alias ImportFrom alias identifier ImportFrom alias ImportFrom alias ImportFrom alias alias Expr Call NameLoad Str Assign AttributeStore NameLoad attr Dict ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict Str Str Str Str Dict Str Str Str Str NameLoad Assign NameStore Call NameLoad keyword Str Assign NameStore Call NameLoad keyword Str Assign NameStore Call NameLoad keyword ListLoad Str Assign NameStore Call NameLoad keyword Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str Str Str NameLoad NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict Str Str Str Str Dict Str Str NameLoad Assign NameStore Call NameLoad keyword NameLoad Assign NameStore Call NameLoad keyword Str Assign NameStore Call NameLoad keyword ListLoad Str Assign NameStore Call NameLoad keyword Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str Str Str NameLoad NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Str Assert UnaryOpNot AttributeLoad NameLoad attr Assert UnaryOpNot AttributeLoad NameLoad attr Assert UnaryOpNot AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict Str Str Str Str Dict Str Str NameLoad Assign NameStore Call NameLoad keyword Str Assign NameStore Call NameLoad keyword Str Assign NameStore Call NameLoad keyword ListLoad Str Str Assign NameStore Call NameLoad keyword Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str Str Str NameLoad NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Assert UnaryOpNot AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict Str Str Str Str Dict Str Str NameLoad Assign NameStore Call NameLoad keyword Str Assign NameStore Call NameLoad keyword Str Assign NameStore Call NameLoad keyword ListLoad Str Assign NameStore Call NameLoad keyword Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str Str Str NameLoad NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict Str Str Str Str Dict Str Str Str Str NameLoad Assign NameStore Call NameLoad keyword Str Assign NameStore Call NameLoad keyword Str Assign NameStore Call NameLoad keyword ListLoad Str Str Assign NameStore Call NameLoad keyword Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str Str Str NameLoad NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict Str Str Str Str Dict Str Str NameLoad Assign NameStore Call NameLoad keyword NameLoad Assign NameStore Call NameLoad keyword Str Assign NameStore Call NameLoad keyword ListLoad Str Assign NameStore Call NameLoad keyword Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str Str Str NameLoad NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Str Assert UnaryOpNot AttributeLoad NameLoad attr Assert UnaryOpNot AttributeLoad NameLoad attr Assert UnaryOpNot AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict Str Str Str Str Dict Str Str NameLoad Assign NameStore Call NameLoad keyword Str Assign NameStore Call NameLoad keyword Str Assign NameStore Call NameLoad keyword ListLoad Str Assign NameStore Call NameLoad keyword Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str Str Str NameLoad NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Assert UnaryOpNot AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict Str Str Str Str Dict Str Str NameLoad Assign NameStore Call NameLoad keyword Str Assign NameStore Call NameLoad keyword Str Assign NameStore Call NameLoad keyword ListLoad Str Str Assign NameStore Call NameLoad keyword Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str Str Str NameLoad NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list decorator_list If CompareEq NameLoad Str body ImportFrom alias Expr Call NameLoad NameLoad keyword NameLoad
N/A __future__ absolute_import salt.states win_certutil certutil salttesting TestCase salttesting.helpers ensure_in_syspath salttesting.mock MagicMock patch N/A N/A ensure_in_syspath ../../ N/A N/A certutil __salt__ N/A CertUtilTestCase N/A TestCase N/A test_add_serial N/A N/A self N/A N/A N/A 
            Test adding a certificate to specified certificate store
         N/A expected N/A changes comment name result N/A added /path/to/cert.cer /path/to/cert.cer True N/A cache_mock N/A MagicMock return_value /tmp/cert.cer N/A get_cert_serial_mock N/A MagicMock return_value ABCDEF N/A get_store_serials_mock N/A MagicMock return_value N/A 123456 N/A add_mock N/A MagicMock return_value Added successfully N/A N/A N/A patch dict N/A certutil __salt__ N/A cp.cache_file certutil.get_cert_serial certutil.get_stored_cert_serials certutil.add_store cache_mock get_cert_serial_mock get_store_serials_mock add_mock N/A N/A out N/A N/A certutil add_store /path/to/cert.cer TrustedPublisher N/A N/A N/A cache_mock assert_called_once_with /path/to/cert.cer base N/A N/A N/A get_cert_serial_mock assert_called_once_with /tmp/cert.cer N/A N/A N/A get_store_serials_mock assert_called_once_with TrustedPublisher N/A N/A N/A add_mock assert_called_once_with /tmp/cert.cer TrustedPublisher N/A N/A N/A self assertEqual expected out N/A test_add_serial_missing N/A N/A self N/A N/A N/A 
            Test adding a certificate to specified certificate store when the file doesn't exist
         N/A expected N/A changes comment name result N/A Certificate file not found. /path/to/cert.cer False N/A cache_mock N/A MagicMock return_value False N/A get_cert_serial_mock N/A MagicMock return_value ABCDEF N/A get_store_serials_mock N/A MagicMock return_value N/A 123456 N/A add_mock N/A MagicMock return_value Added successfully N/A N/A N/A patch dict N/A certutil __salt__ N/A cp.cache_file certutil.get_cert_serial certutil.get_stored_cert_serials certutil.add_store cache_mock get_cert_serial_mock get_store_serials_mock add_mock N/A N/A out N/A N/A certutil add_store /path/to/cert.cer TrustedPublisher N/A N/A N/A cache_mock assert_called_once_with /path/to/cert.cer base N/A N/A N/A get_cert_serial_mock called N/A N/A N/A get_store_serials_mock called N/A N/A N/A add_mock called N/A N/A N/A self assertEqual expected out N/A test_add_serial_exists N/A N/A self N/A N/A N/A 
            Test adding a certificate to specified certificate store when the cert already exists
         N/A expected N/A changes comment name result N/A /path/to/cert.cer already stored. /path/to/cert.cer True N/A cache_mock N/A MagicMock return_value /tmp/cert.cer N/A get_cert_serial_mock N/A MagicMock return_value ABCDEF N/A get_store_serials_mock N/A MagicMock return_value N/A 123456 ABCDEF N/A add_mock N/A MagicMock return_value Added successfully N/A N/A N/A patch dict N/A certutil __salt__ N/A cp.cache_file certutil.get_cert_serial certutil.get_stored_cert_serials certutil.add_store cache_mock get_cert_serial_mock get_store_serials_mock add_mock N/A N/A out N/A N/A certutil add_store /path/to/cert.cer TrustedPublisher N/A N/A N/A cache_mock assert_called_once_with /path/to/cert.cer base N/A N/A N/A get_cert_serial_mock assert_called_once_with /tmp/cert.cer N/A N/A N/A get_store_serials_mock assert_called_once_with TrustedPublisher N/A N/A N/A add_mock called N/A N/A N/A self assertEqual expected out N/A test_add_serial_fail N/A N/A self N/A N/A N/A 
            Test adding a certificate when the add fails
         N/A expected N/A changes comment name result N/A Failed to store certificate /path/to/cert.cer /path/to/cert.cer False N/A cache_mock N/A MagicMock return_value /tmp/cert.cer N/A get_cert_serial_mock N/A MagicMock return_value ABCDEF N/A get_store_serials_mock N/A MagicMock return_value N/A 123456 N/A add_mock N/A MagicMock return_value Failed N/A N/A N/A patch dict N/A certutil __salt__ N/A cp.cache_file certutil.get_cert_serial certutil.get_stored_cert_serials certutil.add_store cache_mock get_cert_serial_mock get_store_serials_mock add_mock N/A N/A out N/A N/A certutil add_store /path/to/cert.cer TrustedPublisher N/A N/A N/A cache_mock assert_called_once_with /path/to/cert.cer base N/A N/A N/A get_cert_serial_mock assert_called_once_with /tmp/cert.cer N/A N/A N/A get_store_serials_mock assert_called_once_with TrustedPublisher N/A N/A N/A add_mock assert_called_once_with /tmp/cert.cer TrustedPublisher N/A N/A N/A self assertEqual expected out N/A test_del_serial N/A N/A self N/A N/A N/A 
            Test deleting a certificate from a specified certificate store
         N/A expected N/A changes comment name result N/A removed /path/to/cert.cer /path/to/cert.cer True N/A cache_mock N/A MagicMock return_value /tmp/cert.cer N/A get_cert_serial_mock N/A MagicMock return_value ABCDEF N/A get_store_serials_mock N/A MagicMock return_value N/A 123456 ABCDEF N/A del_mock N/A MagicMock return_value Removed successfully N/A N/A N/A patch dict N/A certutil __salt__ N/A cp.cache_file certutil.get_cert_serial certutil.get_stored_cert_serials certutil.del_store cache_mock get_cert_serial_mock get_store_serials_mock del_mock N/A N/A out N/A N/A certutil del_store /path/to/cert.cer TrustedPublisher N/A N/A N/A cache_mock assert_called_once_with /path/to/cert.cer base N/A N/A N/A get_cert_serial_mock assert_called_once_with /tmp/cert.cer N/A N/A N/A get_store_serials_mock assert_called_once_with TrustedPublisher N/A N/A N/A del_mock assert_called_once_with /tmp/cert.cer TrustedPublisher N/A N/A N/A self assertEqual expected out N/A test_del_serial_missing N/A N/A self N/A N/A N/A 
            Test deleting a certificate to specified certificate store when the file doesn't exist
         N/A expected N/A changes comment name result N/A Certificate file not found. /path/to/cert.cer False N/A cache_mock N/A MagicMock return_value False N/A get_cert_serial_mock N/A MagicMock return_value ABCDEF N/A get_store_serials_mock N/A MagicMock return_value N/A 123456 N/A del_mock N/A MagicMock return_value Added successfully N/A N/A N/A patch dict N/A certutil __salt__ N/A cp.cache_file certutil.get_cert_serial certutil.get_stored_cert_serials certutil.del_store cache_mock get_cert_serial_mock get_store_serials_mock del_mock N/A N/A out N/A N/A certutil del_store /path/to/cert.cer TrustedPublisher N/A N/A N/A cache_mock assert_called_once_with /path/to/cert.cer base N/A N/A N/A get_cert_serial_mock called N/A N/A N/A get_store_serials_mock called N/A N/A N/A del_mock called N/A N/A N/A self assertEqual expected out N/A test_del_serial_doesnt_exists N/A N/A self N/A N/A N/A 
            Test deleting a certificate to specified certificate store when the cert doesn't exists
         N/A expected N/A changes comment name result N/A /path/to/cert.cer already removed. /path/to/cert.cer True N/A cache_mock N/A MagicMock return_value /tmp/cert.cer N/A get_cert_serial_mock N/A MagicMock return_value ABCDEF N/A get_store_serials_mock N/A MagicMock return_value N/A 123456 N/A del_mock N/A MagicMock return_value Added successfully N/A N/A N/A patch dict N/A certutil __salt__ N/A cp.cache_file certutil.get_cert_serial certutil.get_stored_cert_serials certutil.del_store cache_mock get_cert_serial_mock get_store_serials_mock del_mock N/A N/A out N/A N/A certutil del_store /path/to/cert.cer TrustedPublisher N/A N/A N/A cache_mock assert_called_once_with /path/to/cert.cer base N/A N/A N/A get_cert_serial_mock assert_called_once_with /tmp/cert.cer N/A N/A N/A get_store_serials_mock assert_called_once_with TrustedPublisher N/A N/A N/A del_mock called N/A N/A N/A self assertEqual expected out N/A test_del_serial_fail N/A N/A self N/A N/A N/A 
            Test deleting a certificate from the store when the delete fails
         N/A expected N/A changes comment name result N/A Failed to remove the certificate /path/to/cert.cer /path/to/cert.cer False N/A cache_mock N/A MagicMock return_value /tmp/cert.cer N/A get_cert_serial_mock N/A MagicMock return_value ABCDEF N/A get_store_serials_mock N/A MagicMock return_value N/A 123456 ABCDEF N/A del_mock N/A MagicMock return_value Failed N/A N/A N/A patch dict N/A certutil __salt__ N/A cp.cache_file certutil.get_cert_serial certutil.get_stored_cert_serials certutil.del_store cache_mock get_cert_serial_mock get_store_serials_mock del_mock N/A N/A out N/A N/A certutil del_store /path/to/cert.cer TrustedPublisher N/A N/A N/A cache_mock assert_called_once_with /path/to/cert.cer base N/A N/A N/A get_cert_serial_mock assert_called_once_with /tmp/cert.cer N/A N/A N/A get_store_serials_mock assert_called_once_with TrustedPublisher N/A N/A N/A del_mock assert_called_once_with /tmp/cert.cer TrustedPublisher N/A N/A N/A self assertEqual expected out N/A N/A N/A N/A __name__ __main__ N/A integration run_tests N/A N/A run_tests CertUtilTestCase needs_daemon False