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 Dict Str Str Str Str Str Dict NameLoad Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr Dict Str Str Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call NameLoad keyword Str Assign NameStore Call NameLoad keyword ListLoad Str Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str NameLoad NameLoad body Assign NameStore Str Expr Call AttributeLoad NameLoad attr Dict Str Str Str Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Assign NameStore Str Expr Call AttributeLoad NameLoad attr Dict Str Str Str Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Assign NameStore Str Expr Call AttributeLoad NameLoad attr Dict Str Str Str Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr Dict Str Str Str Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign NameStore NameLoad Assign NameStore Dict Str Str Str Str NameLoad Dict NameLoad Str Assign NameStore Call NameLoad keyword ListLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str 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 NameLoad Assign NameStore Call NameLoad keyword Dict NameLoad Dict Str Str Str Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Assign NameStore Str Expr Call AttributeLoad NameLoad attr Dict Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr Dict Str Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr Dict Str Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore Call NameLoad keyword Dict NameLoad Dict Str Str Str Str Assign NameStore Call NameLoad keyword ListLoad NameLoad NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str NameLoad NameLoad body With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Assign NameStore Str Expr Call AttributeLoad NameLoad attr Dict Str Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Assign NameStore Str Expr Call AttributeLoad NameLoad attr Dict Str Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore Str 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 selinux N/A N/A selinux __opts__ N/A N/A N/A selinux __salt__ N/A SelinuxTestCase N/A TestCase N/A N/A 
    Test cases for salt.states.selinux
     test_mode N/A N/A self N/A N/A N/A 
        Test to verifies the mode SELinux is running in,
        can be set to enforcing or permissive.
         N/A ret N/A name changes result comment N/A False N/A comt unknown is not an accepted mode N/A N/A N/A ret update N/A name comment unknown comt N/A N/A N/A self assertDictEqual N/A N/A selinux mode unknown ret N/A mock_en N/A MagicMock return_value Enforcing N/A mock_pr N/A MagicMock side_effect N/A Permissive Enforcing N/A N/A N/A patch dict N/A selinux __salt__ N/A selinux.getenforce selinux.setenforce mock_en mock_pr N/A N/A comt SELinux is already in Enforcing mode N/A N/A N/A ret update N/A name comment result Enforcing comt True N/A N/A N/A self assertDictEqual N/A N/A selinux mode Enforcing ret N/A N/A N/A patch dict N/A selinux __opts__ N/A test True N/A N/A comt SELinux mode is set to be changed to Permissive N/A N/A N/A ret update N/A name comment result Permissive comt None N/A N/A N/A self assertDictEqual N/A N/A selinux mode Permissive ret N/A N/A N/A patch dict N/A selinux __opts__ N/A test False N/A N/A comt SELinux has been set to Permissive mode N/A N/A N/A ret update N/A name comment result Permissive comt True N/A N/A N/A self assertDictEqual N/A N/A selinux mode Permissive ret N/A comt Failed to set SELinux to Permissive mode N/A N/A N/A ret update N/A name comment result Permissive comt False N/A N/A N/A self assertDictEqual N/A N/A selinux mode Permissive ret N/A test_boolean N/A N/A self N/A N/A N/A 
        Test to set up an SELinux boolean.
         N/A name samba_create_home_dirs N/A value True N/A ret N/A name changes result comment name N/A False N/A mock_en N/A MagicMock return_value N/A N/A N/A N/A patch dict N/A selinux __salt__ N/A selinux.list_sebool mock_en N/A N/A comt N/A N/A Boolean {0} is not available 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 selinux boolean name value ret N/A mock_bools N/A MagicMock return_value N/A name N/A State Default on on N/A N/A N/A patch dict N/A selinux __salt__ N/A selinux.list_sebool mock_bools N/A N/A comt None is not a valid value for the boolean N/A N/A N/A ret update N/A comment comt N/A N/A N/A self assertDictEqual N/A N/A selinux boolean name None ret N/A comt Boolean is in the correct state 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 selinux boolean name value True ret N/A comt Boolean is in the correct state 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 selinux boolean name value ret N/A mock_bools N/A MagicMock return_value N/A name N/A State Default off on N/A mock N/A MagicMock side_effect N/A True False N/A N/A N/A patch dict N/A selinux __salt__ N/A selinux.list_sebool selinux.setsebool mock_bools mock N/A N/A N/A N/A patch dict N/A selinux __opts__ N/A test True N/A N/A comt Boolean samba_create_home_dirs is set to be changed to on N/A N/A N/A ret update N/A comment result comt None N/A N/A N/A self assertDictEqual N/A N/A selinux boolean name value ret N/A N/A N/A patch dict N/A selinux __opts__ N/A test False N/A N/A comt Boolean samba_create_home_dirs has been set to on 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 selinux boolean name value ret N/A comt Failed to set the boolean samba_create_home_dirs to on 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 selinux boolean name value 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 SelinuxTestCase needs_daemon False