diff options
author | Michal Minar <miminar@redhat.com> | 2013-11-04 17:38:56 +0100 |
---|---|---|
committer | Michal Minar <miminar@redhat.com> | 2013-11-04 17:43:22 +0100 |
commit | 1ac6bdd19d70942dbe69368c7f073f975dd7dc55 (patch) | |
tree | c1a3855cb4ee97cdc777f8d2ca7b5bb3bbc5b8bf /src/software/test/test_software_identity_file_check.py | |
parent | b426e884b4b57db907e2eaf48f3ce26a85662387 (diff) | |
download | openlmi-providers-1ac6bdd19d70942dbe69368c7f073f975dd7dc55.tar.gz openlmi-providers-1ac6bdd19d70942dbe69368c7f073f975dd7dc55.tar.xz openlmi-providers-1ac6bdd19d70942dbe69368c7f073f975dd7dc55.zip |
software: fixed a test
TargetOperatingSystem property is tested also in
TestSoftwareIdentityChecks, let's share the code in util module.
Diffstat (limited to 'src/software/test/test_software_identity_file_check.py')
-rw-r--r-- | src/software/test/test_software_identity_file_check.py | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/software/test/test_software_identity_file_check.py b/src/software/test/test_software_identity_file_check.py index d183933..485a970 100644 --- a/src/software/test/test_software_identity_file_check.py +++ b/src/software/test/test_software_identity_file_check.py @@ -23,7 +23,6 @@ Unit tests for LMI_SoftwareIdentity provider. """ import os -import platform import pywbem import re import subprocess @@ -81,20 +80,13 @@ class TestSoftwareIdentityFileCheck( """ :returns: object path of `LMI_SoftwareIdentityFileCheck` """ - target_operating_system = 36 # LINUX - if hasattr(platform, 'linux_distribution') and \ - platform.linux_distribution( - full_distribution_name=False)[0].lower() == 'redhat': - target_operating_system = 79 # RHEL - if platform.uname()[4].lower() == 'x86_64': - target_operating_system = 80 # RHEL 64bit return self.cim_class.new_instance_name({ "CheckID" : 'LMI:LMI_SoftwareIdentityFileCheck', "Name" : file_name, "SoftwareElementID" : pkg.get_nevra( newer=newer, with_epoch="ALWAYS"), "SoftwareElementState" : pywbem.Uint16(2), #Executable - "TargetOperatingSystem" : pywbem.Uint16(target_operating_system), + "TargetOperatingSystem" : util.get_target_operating_system(), "Version" : getattr(pkg, 'up_evra' if newer else 'evra') }) |