Module Expr Str ImportFrom alias ImportFrom alias alias ImportFrom alias alias ImportFrom alias alias alias alias Expr Call NameLoad Str ImportFrom alias Assign AttributeStore NameLoad attr AttributeStore NameLoad attr Dict ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str body Assign NameStore Call NameLoad keyword Dict Str Str Num Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr ListLoad Str Str Str keyword NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str body Assign NameStore Call NameLoad keyword Dict Str Str Num Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr ListLoad Str Str Str keyword NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str body Assign NameStore Call NameLoad keyword Dict Str Str Str Num Str Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr ListLoad Str Str Str keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str With Call NameLoad NameStore body Assign AttributeStore NameLoad attr Call NameLoad Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Str Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Str decorator_list Call NameLoad Str FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str body Assign NameStore Call NameLoad keyword Dict Str Str Num Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Str Str Num Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr ListLoad Str Str Str Str Str Str keyword NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str body Assign NameStore Call NameLoad keyword Dict Str Str Num Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Str Str Num Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr ListLoad Str Str Str Str Str Str keyword NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str body Assign NameStore Call NameLoad keyword Dict Str Str Str Num Str Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Str Str Num Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr ListLoad Str Str Str Str Str Str keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str body Assign NameStore Call NameLoad keyword Dict Str Str Num Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr ListLoad Str Str Str Str keyword NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str body Assign NameStore Call NameLoad keyword Dict Str Str Num Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr ListLoad Str Str Str Str keyword NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str body Assign NameStore Call NameLoad keyword Dict Str Str Str Num Str Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr ListLoad Str Str Str Str keyword 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:`Pedro Algarvio (pedro@algarvio.me)`


    tests.unit.modules.alternatives_test
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 __future__ absolute_import salttesting skipIf TestCase salttesting.helpers ensure_in_syspath TestsLoggingHandler salttesting.mock NO_MOCK NO_MOCK_REASON MagicMock patch N/A N/A ensure_in_syspath ../../ salt.modules alternatives N/A N/A alternatives __salt__ N/A alternatives __grains__ N/A AlternativesTestCase N/A TestCase N/A test_display N/A N/A self N/A N/A N/A N/A N/A patch dict N/A alternatives __grains__ N/A os_family RedHat N/A N/A mock N/A MagicMock return_value N/A retcode stdout 0 salt N/A N/A N/A patch dict N/A alternatives __salt__ N/A cmd.run_all mock N/A N/A solution N/A N/A alternatives display better-world N/A N/A N/A self assertEqual salt solution N/A N/A N/A mock assert_called_once_with N/A alternatives --display better-world python_shell False N/A N/A N/A patch dict N/A alternatives __grains__ N/A os_family Ubuntu N/A N/A mock N/A MagicMock return_value N/A retcode stdout 0 undoubtedly-salt N/A N/A N/A patch dict N/A alternatives __salt__ N/A cmd.run_all mock N/A N/A solution N/A N/A alternatives display better-world N/A N/A N/A self assertEqual undoubtedly-salt solution N/A N/A N/A mock assert_called_once_with N/A update-alternatives --display better-world python_shell False N/A N/A N/A patch dict N/A alternatives __grains__ N/A os_family RedHat N/A N/A mock N/A MagicMock return_value N/A retcode stdout stderr 1 salt-out salt-err N/A N/A N/A patch dict N/A alternatives __salt__ N/A cmd.run_all mock N/A N/A solution N/A N/A alternatives display better-world N/A N/A N/A self assertEqual salt-err solution N/A N/A N/A mock assert_called_once_with N/A alternatives --display better-world python_shell False N/A test_show_current N/A N/A self os_readlink_mock N/A N/A N/A N/A os_readlink_mock return_value /etc/alternatives/salt N/A ret N/A N/A alternatives show_current better-world N/A N/A N/A self assertEqual /etc/alternatives/salt ret N/A N/A N/A os_readlink_mock assert_called_once_with /etc/alternatives/better-world N/A N/A TestsLoggingHandler handler N/A N/A N/A os_readlink_mock side_effect N/A OSError Hell was not found!!! N/A N/A N/A self assertFalse N/A N/A alternatives show_current hell N/A N/A N/A os_readlink_mock assert_called_with /etc/alternatives/hell N/A N/A N/A self assertIn ERROR:alternatives: path /etc/alternatives/hell does not exist N/A handler messages N/A N/A patch os.readlink test_check_installed N/A N/A self os_readlink_mock N/A N/A N/A N/A os_readlink_mock return_value /etc/alternatives/salt N/A N/A N/A self assertTrue N/A N/A alternatives check_installed better-world /etc/alternatives/salt N/A N/A os_readlink_mock return_value False N/A N/A N/A self assertFalse N/A N/A alternatives check_installed help /etc/alternatives/salt N/A N/A patch os.readlink test_install N/A N/A self N/A N/A N/A N/A N/A patch dict N/A alternatives __grains__ N/A os_family RedHat N/A N/A mock N/A MagicMock return_value N/A retcode stdout 0 salt N/A N/A N/A patch dict N/A alternatives __salt__ N/A cmd.run_all mock N/A N/A solution N/A N/A alternatives install better-world /usr/bin/better-world /usr/bin/salt 100 N/A N/A N/A self assertEqual salt solution N/A N/A N/A mock assert_called_once_with N/A alternatives --install /usr/bin/better-world better-world /usr/bin/salt 100 python_shell False N/A N/A N/A patch dict N/A alternatives __grains__ N/A os_family Debian N/A N/A mock N/A MagicMock return_value N/A retcode stdout 0 salt N/A N/A N/A patch dict N/A alternatives __salt__ N/A cmd.run_all mock N/A N/A solution N/A N/A alternatives install better-world /usr/bin/better-world /usr/bin/salt 100 N/A N/A N/A self assertEqual salt solution N/A N/A N/A mock assert_called_once_with N/A update-alternatives --install /usr/bin/better-world better-world /usr/bin/salt 100 python_shell False N/A N/A N/A patch dict N/A alternatives __grains__ N/A os_family RedHat N/A N/A mock N/A MagicMock return_value N/A retcode stdout stderr 1 salt-out salt-err N/A N/A N/A patch dict N/A alternatives __salt__ N/A cmd.run_all mock N/A N/A ret N/A N/A alternatives install better-world /usr/bin/better-world /usr/bin/salt 100 N/A N/A N/A self assertEqual salt-err ret N/A N/A N/A mock assert_called_once_with N/A alternatives --install /usr/bin/better-world better-world /usr/bin/salt 100 python_shell False N/A test_remove N/A N/A self N/A N/A N/A N/A N/A patch dict N/A alternatives __grains__ N/A os_family RedHat N/A N/A mock N/A MagicMock return_value N/A retcode stdout 0 salt N/A N/A N/A patch dict N/A alternatives __salt__ N/A cmd.run_all mock N/A N/A solution N/A N/A alternatives remove better-world /usr/bin/better-world N/A N/A N/A self assertEqual salt solution N/A N/A N/A mock assert_called_once_with N/A alternatives --remove better-world /usr/bin/better-world python_shell False N/A N/A N/A patch dict N/A alternatives __grains__ N/A os_family Debian N/A N/A mock N/A MagicMock return_value N/A retcode stdout 0 salt N/A N/A N/A patch dict N/A alternatives __salt__ N/A cmd.run_all mock N/A N/A solution N/A N/A alternatives remove better-world /usr/bin/better-world N/A N/A N/A self assertEqual salt solution N/A N/A N/A mock assert_called_once_with N/A update-alternatives --remove better-world /usr/bin/better-world python_shell False N/A N/A N/A patch dict N/A alternatives __grains__ N/A os_family RedHat N/A N/A mock N/A MagicMock return_value N/A retcode stdout stderr 1 salt-out salt-err N/A N/A N/A patch dict N/A alternatives __salt__ N/A cmd.run_all mock N/A N/A solution N/A N/A alternatives remove better-world /usr/bin/better-world N/A N/A N/A self assertEqual salt-err solution N/A N/A N/A mock assert_called_once_with N/A alternatives --remove better-world /usr/bin/better-world python_shell False 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