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 ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Dict decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Dict decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Dict Str Str ListLoad ListLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Dict Str Str ListLoad Dict decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Assign NameStore Str Assign NameStore Call NameLoad keyword NameLoad With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Str Assign NameStore Dict Str Str Str Str Assign NameStore Call NameLoad keyword ListLoad Str Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Call NameLoad keyword NameLoad With Call NameLoad Str Call NameLoad keyword Num body Expr Call AttributeLoad NameLoad attr Num Call AttributeLoad NameLoad attr Str Str decorator_list Call NameLoad Str NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Call NameLoad keyword NameLoad With Call NameLoad Str Call NameLoad keyword Num body Expr Call AttributeLoad NameLoad attr Num Call AttributeLoad NameLoad attr Str Str decorator_list Call NameLoad Str NameLoad 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 TestCase skipIf salttesting.mock MagicMock patch NO_MOCK NO_MOCK_REASON salttesting.helpers ensure_in_syspath N/A N/A ensure_in_syspath ../../ salt.modules rpm N/A N/A rpm __salt__ N/A RpmTestCase N/A TestCase N/A N/A 
    Test cases for salt.modules.rpm
     test_list_pkgs N/A N/A self N/A N/A N/A 
        Test if it list the packages currently installed in a dict
         N/A mock N/A MagicMock return_value N/A N/A N/A patch dict N/A rpm __salt__ N/A cmd.run mock N/A N/A N/A N/A self assertDictEqual N/A N/A rpm list_pkgs N/A N/A test_verify N/A N/A self N/A N/A N/A 
        Test if it runs an rpm -Va on a system,
        and returns the results in a dict
         N/A mock N/A MagicMock return_value N/A N/A N/A patch dict N/A rpm __salt__ N/A cmd.run mock N/A N/A N/A N/A self assertDictEqual N/A N/A rpm verify httpd N/A N/A test_file_list N/A N/A self N/A N/A N/A 
        Test if it list the files that belong to a package.
         N/A mock N/A MagicMock return_value N/A N/A N/A patch dict N/A rpm __salt__ N/A cmd.run mock N/A N/A N/A N/A self assertDictEqual N/A N/A rpm file_list httpd N/A errors files N/A N/A N/A test_file_dict N/A N/A self N/A N/A N/A 
        Test if it list the files that belong to a package
         N/A mock N/A MagicMock return_value N/A N/A N/A patch dict N/A rpm __salt__ N/A cmd.run mock N/A N/A N/A N/A self assertDictEqual N/A N/A rpm file_dict httpd N/A errors packages N/A N/A N/A test_owner N/A N/A self N/A N/A N/A 
        Test if it return the name of the package that owns the file.
         N/A N/A N/A self assertEqual N/A N/A rpm owner N/A ret file /usr/bin/salt-jenkins-build is not owned by any package N/A mock N/A MagicMock return_value ret N/A N/A N/A patch dict N/A rpm __salt__ N/A cmd.run_stdout mock N/A N/A N/A N/A self assertEqual N/A N/A rpm owner /usr/bin/salt-jenkins-build N/A ret N/A /usr/bin/vim /usr/bin/python vim-enhanced-7.4.160-1.e17.x86_64 python-2.7.5-16.e17.x86_64 N/A mock N/A MagicMock side_effect N/A python-2.7.5-16.e17.x86_64 vim-enhanced-7.4.160-1.e17.x86_64 N/A N/A N/A patch dict N/A rpm __salt__ N/A cmd.run_stdout mock N/A N/A N/A N/A self assertDictEqual N/A N/A rpm owner /usr/bin/python /usr/bin/vim ret N/A test_version_cmp_rpm N/A N/A self N/A N/A N/A 
        Test package version is called RPM version if RPM-Python is installed

        :return:
         N/A N/A rpm rpm N/A MagicMock return_value MagicMock N/A N/A patch salt.modules.rpm.rpm.labelCompare N/A MagicMock return_value 0 N/A N/A N/A N/A self assertEqual 0 N/A N/A rpm version_cmp 1 2 N/A N/A patch salt.modules.rpm.HAS_RPM True test_version_cmp_fallback N/A N/A self N/A N/A N/A 
        Test package version is called RPM version if RPM-Python is installed

        :return:
         N/A N/A rpm rpm N/A MagicMock return_value MagicMock N/A N/A patch salt.modules.rpm.rpm.labelCompare N/A MagicMock return_value 0 N/A N/A N/A N/A self assertEqual -1 N/A N/A rpm version_cmp 1 2 N/A N/A patch salt.modules.rpm.HAS_RPM False 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 RpmTestCase needs_daemon False