From: Mukund Sivaraman Date: Sun, 23 Jun 2013 20:44:09 +0000 (+0530) Subject: [2855] Make the response a tuple X-Git-Tag: bind10-1.2.0beta1-release~371^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ee58a132fe6313d7d2d9ecc7eba8b455975ebac7;p=thirdparty%2Fkea.git [2855] Make the response a tuple This is for some kind of compatibility with future tickets, but the exact format of the response list is currently not decided. --- diff --git a/src/lib/python/isc/memmgr/builder.py b/src/lib/python/isc/memmgr/builder.py index f01f830c75..2e8b71ca5c 100644 --- a/src/lib/python/isc/memmgr/builder.py +++ b/src/lib/python/isc/memmgr/builder.py @@ -91,7 +91,7 @@ class MemorySegmentBuilder: # notified. Instead return this in the response # queue. with self._lock: - self._response_queue.append('bad_command') + self._response_queue.append(('bad_command',)) # In this case, we do not notify the main # thread about a response on the socket, as # we quit the main loop here anyway (and any diff --git a/src/lib/python/isc/memmgr/tests/builder_tests.py b/src/lib/python/isc/memmgr/tests/builder_tests.py index 2b21337284..230f39618d 100644 --- a/src/lib/python/isc/memmgr/tests/builder_tests.py +++ b/src/lib/python/isc/memmgr/tests/builder_tests.py @@ -73,7 +73,10 @@ class TestMemorySegmentBuilder(unittest.TestCase): with self._builder_lock: self.assertEqual(len(self._builder_command_queue), 0) self.assertEqual(len(self._builder_response_queue), 1) - self.assertListEqual(self._builder_response_queue, ['bad_command']) + + response = self._builder_response_queue[0] + self.assertTrue(isinstance(response, tuple)) + self.assertTupleEqual(response, ('bad_command',)) self._builder_response_queue.clear() def test_shutdown(self):