From 416a465e84a02d6885067ba9c3cf7f2fdd268d6d Mon Sep 17 00:00:00 2001 From: Adrian Likins Date: Wed, 23 Jul 2008 15:48:50 -0400 Subject: apply patch from awood@redhat.com thats adds a filter to the yumcmd.check_update call also add awood to Authors, and add a few unit tests --- test/unittest/test_client.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'test/unittest') diff --git a/test/unittest/test_client.py b/test/unittest/test_client.py index 82d205e..4734093 100644 --- a/test/unittest/test_client.py +++ b/test/unittest/test_client.py @@ -383,6 +383,24 @@ class TestYum(BaseTest): result = self.overlord.yumcmd.check_update() self.assert_on_fault(result) + def test_check_update_empty_filter(self): + results = self.overlord.yumcmd.check_update([]) + self.assert_on_fault(results) + results_no_filter = self.overlord.yumcmd.check_update() + assert results == results_no_filter + + def test_check_update_splat_filter(self): + results = self.overlord.yumcmd.check_update(['*']) + self.assert_on_fault(results) + results_no_filter = self.overlord.yumcmd.check_update() + assert results == results_no_filter + +# this fails on fc6, need to test on newer yum to see whats up +# def test_update_non_existent_package(self): +# result = self.overlord.yumcmd.update("thisisapackage-_-that_should==never+exist234234234") +# self.assert_on_fault(result) +# # hmm, that method always returns True... not much to test there... -akl + class TestIptables(BaseTest): module = "iptables" -- cgit