]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2298_7] add comments about checking each 'item' element under the root element
authorNaoki Kambe <kambe@jprs.co.jp>
Tue, 6 Nov 2012 12:22:33 +0000 (21:22 +0900)
committerNaoki Kambe <kambe@jprs.co.jp>
Tue, 6 Nov 2012 12:40:16 +0000 (21:40 +0900)
src/bin/stats/tests/b10-stats-httpd_test.py

index 4aa79492dc45f2471b8c636798117f43cd031a63..85e65e26d17c4d31c91530c4844e4300debf6ff9 100644 (file)
@@ -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: