[Kimchi-devel] [PATCH 5/5 V3] Host's software update: Update test cases.
Aline Manera
alinefm at linux.vnet.ibm.com
Wed Feb 12 12:32:18 UTC 2014
Please, also add a test for the REST API (test_rest.py)
On 02/11/2014 03:28 PM, Paulo Vital wrote:
> 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()
More information about the Kimchi-devel
mailing list