[Kimchi-devel] [PATCH 5/5 V3] Host's software update: Update test cases.
Paulo Vital
pvital at linux.vnet.ibm.com
Tue Feb 11 17:28:54 UTC 2014
Added unit tests into test_mockmodel.py
Signed-off-by: Paulo Vital <pvital at linux.vnet.ibm.com>
---
tests/test_mockmodel.py | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/tests/test_mockmodel.py b/tests/test_mockmodel.py
index 29413a9..10dcd8a 100644
--- a/tests/test_mockmodel.py
+++ b/tests/test_mockmodel.py
@@ -152,3 +152,14 @@ class MockModelTests(unittest.TestCase):
self.assertEquals(stats_keys, set(eval(info['stats']).keys()))
self.assertEquals('vnc', info['graphics']['type'])
self.assertEquals('0.0.0.0', info['graphics']['listen'])
+
+ def test_packages_update(self):
+ pkgs = model.packagesupdate_get_list()
+ for pkg_name in pkgs.keys():
+ pkgupdate = model.packageupdate_lookup(pkg_name)
+ pkg = pkgs[pkg_name]
+ self.assertEquals(pkg['package_name'], pkgupdate['package_name'])
+ self.assertEquals(pkg['repository'], pkgupdate['repository'])
+ self.assertEquals(pkg['arch'], pkgupdate['arch'])
+ self.assertEquals(pkg['version'], pkgupdate['version'])
+ task_update = model.packagesupdate_update()
--
1.8.3.1
More information about the Kimchi-devel
mailing list