summaryrefslogtreecommitdiffstats
path: root/src/software
diff options
context:
space:
mode:
authorMichal Minar <miminar@redhat.com>2013-07-09 13:02:02 +0200
committerMichal Minar <miminar@redhat.com>2013-07-23 13:52:35 +0200
commit9618e135bf2e54dea9679e943215d055f73c4375 (patch)
tree6763ab54cf37a93069893ddbfab332176dd2d22a /src/software
parent9f8455256f253afbeff8f170365a2de4c42e97a5 (diff)
downloadopenlmi-providers-9618e135bf2e54dea9679e943215d055f73c4375.tar.gz
openlmi-providers-9618e135bf2e54dea9679e943215d055f73c4375.tar.xz
openlmi-providers-9618e135bf2e54dea9679e943215d055f73c4375.zip
software: test fixes
let's not presume, that package has any files
Diffstat (limited to 'src/software')
-rw-r--r--src/software/lmi/software/LMI_HostedSoftwareIdentityResource.py4
-rwxr-xr-xsrc/software/test/test_software_identity_checks.py3
2 files changed, 5 insertions, 2 deletions
diff --git a/src/software/lmi/software/LMI_HostedSoftwareIdentityResource.py b/src/software/lmi/software/LMI_HostedSoftwareIdentityResource.py
index cc6182e..942d1f2 100644
--- a/src/software/lmi/software/LMI_HostedSoftwareIdentityResource.py
+++ b/src/software/lmi/software/LMI_HostedSoftwareIdentityResource.py
@@ -41,8 +41,8 @@ def generate_system_referents(env, object_name, model, _keys_only):
Handler for referents enumeration request.
"""
ComputerSystem.check_path(env, object_name, "Antecedent")
- repomodel = util.new_instance_name('LMI_SoftwareIdentityResource',
- Antecedent=ComputerSystem.get_path())
+ repomodel = util.new_instance_name('LMI_SoftwareIdentityResource')
+ model["Antecedent"] = ComputerSystem.get_path()
for repo in YumDB.get_instance().get_repository_list('all'):
model["Dependent"] = IdentityResource.repo2model(repo, model=repomodel)
yield model
diff --git a/src/software/test/test_software_identity_checks.py b/src/software/test/test_software_identity_checks.py
index 9ebd7ff..65ac6f4 100755
--- a/src/software/test/test_software_identity_checks.py
+++ b/src/software/test/test_software_identity_checks.py
@@ -97,6 +97,9 @@ class TestSoftwareIdentityChecks(base.SoftwareBaseTestCase):
"""
for pkg in self.safe_pkgs:
files = self.pkgdb_files[pkg.name]
+ if not files:
+ # package may not have any file
+ continue
objpath = self.make_op(pkg, files[0])
refs = self.conn.AssociatorNames(
Role="Element",