Added unit tests into test_mockmodel.py
Signed-off-by: Paulo Vital <pvital(a)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