summaryrefslogtreecommitdiffstats
path: root/src/software
diff options
context:
space:
mode:
Diffstat (limited to 'src/software')
-rwxr-xr-xsrc/software/test/test_installed_software_identity.py11
-rwxr-xr-xsrc/software/test/test_software_identity.py1
2 files changed, 4 insertions, 8 deletions
diff --git a/src/software/test/test_installed_software_identity.py b/src/software/test/test_installed_software_identity.py
index 72bb7cd..07189f0 100755
--- a/src/software/test/test_installed_software_identity.py
+++ b/src/software/test/test_installed_software_identity.py
@@ -182,10 +182,8 @@ class TestInstalledSoftwareIdentity(base.SoftwareBaseTestCase):
'Object path does not match for %s.' % pkg)
# try to install second time
- with self.assertRaises(pywbem.CIMError) as cm:
- self.conn.CreateInstance(NewInstance=inst)
- self.assertEqual(cm.exception.args[0],
- pywbem.CIM_ERR_ALREADY_EXISTS)
+ self.assertRaisesCIM(pywbem.CIM_ERR_ALREADY_EXISTS
+ self.conn.CreateInstance, NewInstance=inst)
@base.mark_dangerous
def test_delete_instance(self):
@@ -200,9 +198,8 @@ class TestInstalledSoftwareIdentity(base.SoftwareBaseTestCase):
self.assertFalse(rpmcache.is_pkg_installed(pkg),
"Failed to delete instance for %s." % pkg)
- with self.assertRaises(pywbem.CIMError) as cm:
- self.conn.DeleteInstance(InstanceName=objpath)
- self.assertEqual(cm.exception.args[0], pywbem.CIM_ERR_NOT_FOUND)
+ self.assertRaisesCIM(pywbem.CIM_ERR_NOT_FOUND,
+ self.conn.DeleteInstance, InstanceName=objpath)
@base.mark_tedious
def test_get_system_referents(self):
diff --git a/src/software/test/test_software_identity.py b/src/software/test/test_software_identity.py
index 3b94e01..47eee28 100755
--- a/src/software/test/test_software_identity.py
+++ b/src/software/test/test_software_identity.py
@@ -41,7 +41,6 @@ class TestSoftwareIdentity(base.SoftwareBaseTestCase): #pylint: disable=R0904
def make_op(self, pkg, newer=True):
"""
- @param ses SoftwareElementState property value
@return object path of SoftwareIdentity
"""
objpath = self.objpath.copy()