Module Expr Str ImportFrom alias ImportFrom alias alias ImportFrom alias alias alias alias ImportFrom alias Expr Call NameLoad Str ImportFrom alias Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Dict ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Num Assign NameStore Dict Str Str Str Str Str Str Str NameLoad NameLoad NameLoad NameLoad NameLoad Dict Str Assign NameStore Call NameLoad keyword ListLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad keyword NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str NameLoad NameLoad body Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Dict Str Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Dict Str Str NameLoad NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Dict Str Str Str NameLoad NameLoad Dict Str Str Str Str NameLoad NameLoad NameLoad NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign NameStore Str Assign NameStore Dict Str Str Str Str Str NameLoad NameLoad NameLoad Dict Str Assign NameStore Call NameLoad keyword ListLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad keyword NameLoad Assign NameStore Call NameLoad keyword ListLoad NameLoad NameLoad NameLoad NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str Str NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr Dict Str NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr Dict Str Str NameLoad NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr Dict Str Str Str NameLoad NameLoad Dict Str NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr Dict Str Str Str NameLoad NameLoad Dict Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr Dict Str Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign NameStore Dict Str Str Str Str NameLoad NameLoad Dict Str Assign NameStore Call NameLoad keyword ListLoad Str Str Str Assign NameStore Call NameLoad keyword NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str NameLoad NameLoad body Assign NameStore Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr Dict Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr Dict Str Str NameLoad NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Dict Str Str Str Str NameLoad Dict Str NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign NameStore Str Assign NameStore Dict Str Str Str Str Str NameLoad NameLoad NameLoad Dict Str Assign NameStore Call NameLoad keyword ListLoad NameLoad NameLoad Str Assign NameStore Call NameLoad keyword NameLoad Assign NameStore Call NameLoad keyword ListLoad NameLoad NameLoad NameLoad NameLoad NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str Str NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Dict Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr Dict Str Str NameLoad NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr Dict Str Str NameLoad NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Dict Str Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list decorator_list Call NameLoad NameLoad NameLoad If CompareEq NameLoad Str body ImportFrom alias Expr Call NameLoad NameLoad keyword NameLoad
N/A N/A 
    :codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
 __future__ absolute_import salttesting skipIf TestCase salttesting.mock NO_MOCK NO_MOCK_REASON MagicMock patch salttesting.helpers ensure_in_syspath N/A N/A ensure_in_syspath ../../ salt.states alternatives N/A N/A alternatives __opts__ N/A N/A N/A alternatives __salt__ N/A AlternativesTestCase N/A TestCase N/A N/A 
    Test cases for salt.states.alternatives
     test_install N/A N/A self N/A N/A N/A 
        Test to install new alternative for defined <name>
         N/A name pager N/A link /usr/bin/pager N/A path /usr/bin/less N/A priority 5 N/A ret N/A name link path priority result changes comment name link path priority None N/A N/A mock N/A MagicMock side_effect N/A True False False N/A mock_bool N/A MagicMock return_value True N/A N/A N/A patch dict N/A alternatives __salt__ N/A alternatives.check_installed alternatives.install mock mock_bool N/A N/A comt N/A N/A Alternatives for {0} is already set to {1} format name path N/A N/A N/A ret update N/A comment result comt True N/A N/A N/A self assertDictEqual N/A N/A alternatives install name link path priority ret N/A comt N/A N/A Alternative will be set for {0} to {1} with priority {2} format name path priority N/A N/A N/A ret update N/A comment result comt None N/A N/A N/A patch dict N/A alternatives __opts__ N/A test True N/A N/A N/A N/A self assertDictEqual N/A N/A alternatives install name link path priority ret N/A comt N/A N/A Setting alternative for {0} to {1} with priority {2} format name path priority N/A N/A N/A ret update N/A comment result changes comt True N/A name link path priority name link path priority N/A N/A N/A patch dict N/A alternatives __opts__ N/A test False N/A N/A N/A N/A self assertDictEqual N/A N/A alternatives install name link path priority ret N/A test_remove N/A N/A self N/A N/A N/A 
        Test to removes installed alternative for defined <name> and <path>
        or fallback to default alternative, if some defined before.
         N/A name pager N/A path /usr/bin/less N/A ret N/A name path result changes comment name path None N/A N/A mock N/A MagicMock side_effect N/A True True True False False N/A mock_bool N/A MagicMock return_value True N/A mock_bol N/A MagicMock side_effect N/A False True True False N/A N/A N/A patch dict N/A alternatives __salt__ N/A alternatives.check_exists alternatives.show_current alternatives.remove mock mock_bol mock_bool N/A N/A comt N/A N/A Alternative for {0} will be removed format name N/A N/A N/A ret update N/A comment comt N/A N/A N/A patch dict N/A alternatives __opts__ N/A test True N/A N/A N/A N/A self assertDictEqual N/A N/A alternatives remove name path ret N/A comt N/A N/A Alternative for {0} removed format name N/A N/A N/A ret update N/A comment result comt True N/A N/A N/A patch dict N/A alternatives __opts__ N/A test False N/A N/A N/A N/A self assertDictEqual N/A N/A alternatives remove name path ret N/A comt Alternative for pager removed. Falling back to path True N/A N/A N/A ret update N/A comment result changes comt True N/A path True N/A N/A N/A patch dict N/A alternatives __opts__ N/A test False N/A N/A N/A N/A self assertDictEqual N/A N/A alternatives remove name path ret N/A comt N/A N/A Alternative for {0} is set to it's default path True format name N/A N/A N/A ret update N/A comment result changes comt True N/A N/A N/A N/A self assertDictEqual N/A N/A alternatives remove name path ret N/A comt N/A N/A Alternative for {0} doesn't exist format name N/A N/A N/A ret update N/A comment result comt False N/A N/A N/A self assertDictEqual N/A N/A alternatives remove name path ret N/A test_auto N/A N/A self N/A N/A N/A 
        Test to instruct alternatives to use the highest priority
        path for <name>
         N/A name pager N/A ret N/A name result changes comment name True N/A N/A mock N/A MagicMock side_effect N/A  auto mode N/A mock_auto N/A MagicMock return_value True N/A N/A N/A patch dict N/A alternatives __salt__ N/A alternatives.display alternatives.auto mock mock_auto N/A N/A comt N/A N/A {0} already in auto mode format name N/A N/A N/A ret update N/A comment comt N/A N/A N/A self assertDictEqual N/A N/A alternatives auto name ret N/A comt N/A N/A {0} will be put in auto mode format name N/A N/A N/A ret update N/A comment result comt None N/A N/A N/A patch dict N/A alternatives __opts__ N/A test True N/A N/A N/A N/A self assertDictEqual N/A N/A alternatives auto name ret N/A N/A N/A ret update N/A comment result changes True N/A result True N/A N/A N/A patch dict N/A alternatives __opts__ N/A test False N/A N/A N/A N/A self assertDictEqual N/A N/A alternatives auto name ret N/A test_set N/A N/A self N/A N/A N/A 
        Test to sets alternative for <name> to <path>, if <path> is defined
        as an alternative for <name>.
         N/A name pager N/A path /usr/bin/less N/A ret N/A name path result changes comment name path True N/A N/A mock N/A MagicMock side_effect N/A path path N/A mock_bool N/A MagicMock return_value True N/A mock_bol N/A MagicMock side_effect N/A path False False False False N/A N/A N/A patch dict N/A alternatives __salt__ N/A alternatives.display alternatives.show_current alternatives.set mock mock_bol mock_bool N/A N/A comt N/A N/A Alternative for {0} already set to {1} format name path N/A N/A N/A ret update N/A comment comt N/A N/A N/A self assertDictEqual N/A N/A alternatives set_ name path ret N/A comt N/A N/A Alternative for {0} will be set to path False format name N/A N/A N/A ret update N/A comment result comt None N/A N/A N/A patch dict N/A alternatives __opts__ N/A test True N/A N/A N/A N/A self assertDictEqual N/A N/A alternatives set_ name path ret N/A comt N/A N/A Alternative for {0} not updated format name N/A N/A N/A ret update N/A comment result comt True N/A N/A N/A patch dict N/A alternatives __opts__ N/A test False N/A N/A N/A N/A self assertDictEqual N/A N/A alternatives set_ name path ret N/A comt N/A N/A Alternative {0} for {1} doesn't exist format path name N/A N/A N/A ret update N/A comment result comt False N/A N/A N/A self assertDictEqual N/A N/A alternatives set_ name path ret N/A N/A N/A skipIf NO_MOCK NO_MOCK_REASON N/A N/A __name__ __main__ N/A integration run_tests N/A N/A run_tests AlternativesTestCase needs_daemon False