From: Naoki Kambe Date: Tue, 6 Nov 2012 12:22:33 +0000 (+0900) Subject: [2298_7] add comments about checking each 'item' element under the root element X-Git-Tag: trac2487_base~1^2~26^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e089a516107add7d48a7b8d2007bc39819bc5a9;p=thirdparty%2Fkea.git [2298_7] add comments about checking each 'item' element under the root element --- diff --git a/src/bin/stats/tests/b10-stats-httpd_test.py b/src/bin/stats/tests/b10-stats-httpd_test.py index 4aa79492dc..85e65e26d1 100644 --- a/src/bin/stats/tests/b10-stats-httpd_test.py +++ b/src/bin/stats/tests/b10-stats-httpd_test.py @@ -256,8 +256,14 @@ class TestHttpHandler(unittest.TestCase): for elem in root: attr = elem.attrib value = isc.cc.data.find(DUMMY_DATA, attr['identifier']) + # No 'value' attribute should be found in the 'item' + # element when datatype of the value is list or dict. if type(value) is list or type(value) is dict: self.assertFalse('value' in attr) + # The value of the 'value' attribute should be checked + # after casting it to string type if datatype of the + # value is int or float. Because attr['value'] returns + # string type even if its value is int or float. elif type(value) is int or type(value) is float: self.assertEqual(attr['value'], str(value)) else: