From 9618e135bf2e54dea9679e943215d055f73c4375 Mon Sep 17 00:00:00 2001 From: Michal Minar Date: Tue, 9 Jul 2013 13:02:02 +0200 Subject: software: test fixes let's not presume, that package has any files --- src/software/lmi/software/LMI_HostedSoftwareIdentityResource.py | 4 ++-- src/software/test/test_software_identity_checks.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src/software') 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", -- cgit