From 17b2848f122b6b18d0d3b5e9e1832c5f3386e926 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Nowak?= <luke@nexedi.com> Date: Mon, 14 May 2012 16:00:37 +0200 Subject: [PATCH] Check types of passed data. --- .../TestTemplateItem/testVifibSlaposRestAPIV1.py | 11 ++++++++++- master/bt5/vifib_slapos_rest_api_v1_test/bt/revision | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/master/bt5/vifib_slapos_rest_api_v1_test/TestTemplateItem/testVifibSlaposRestAPIV1.py b/master/bt5/vifib_slapos_rest_api_v1_test/TestTemplateItem/testVifibSlaposRestAPIV1.py index 76df02197..7acffc13b 100644 --- a/master/bt5/vifib_slapos_rest_api_v1_test/TestTemplateItem/testVifibSlaposRestAPIV1.py +++ b/master/bt5/vifib_slapos_rest_api_v1_test/TestTemplateItem/testVifibSlaposRestAPIV1.py @@ -145,9 +145,18 @@ class VifibSlaposRestAPIV1Mixin(TestVifibSlapWebServiceMixin): ('status', 'state') ): kwargs[k_i] = kwargs.pop(k_j) - self.assertEqual(stored, + self.assertEqual(stored, [{'recargs': args, 'reckwargs': kwargs, 'recmethod': 'requestSoftwareInstance'}]) + reckwargs = stored[0]['reckwargs'] + self.assertEqual( + set([ + type(reckwargs['software_title']), type(reckwargs['software_release']), + type(reckwargs['software_type']), type(reckwargs['state']), + type(reckwargs['instance_xml']), type(reckwargs['sla_xml']) + ]), + set([str]) + ) class TestInstanceRequest(VifibSlaposRestAPIV1Mixin): def test_not_logged_in(self): diff --git a/master/bt5/vifib_slapos_rest_api_v1_test/bt/revision b/master/bt5/vifib_slapos_rest_api_v1_test/bt/revision index 801f18010..31ff414b7 100644 --- a/master/bt5/vifib_slapos_rest_api_v1_test/bt/revision +++ b/master/bt5/vifib_slapos_rest_api_v1_test/bt/revision @@ -1 +1 @@ -47 \ No newline at end of file +48 \ No newline at end of file -- 2.30.9