diff options
Diffstat (limited to 'tests/test_rpc_server.py')
-rw-r--r-- | tests/test_rpc_server.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/test_rpc_server.py b/tests/test_rpc_server.py index 4d28a79..394bf99 100644 --- a/tests/test_rpc_server.py +++ b/tests/test_rpc_server.py @@ -51,6 +51,12 @@ class ServerSetupMixin(object): def deserialize_entity(self, ctxt, entity): return 'd' + (entity or '') + def serialize_context(self, ctxt): + return dict([(k, 's' + v) for k, v in ctxt.items()]) + + def deserialize_context(self, ctxt): + return dict([(k, 'd' + v) for k, v in ctxt.items()]) + def __init__(self): self.serializer = self.TestSerializer() @@ -254,7 +260,7 @@ class TestRPCServer(test_utils.BaseTestCase, ServerSetupMixin): self.assertEqual(client.call({'dsa': 'b'}, 'ctxt_check', key='a'), - 'dsb') + 'dsdsb') self._stop_server(client, server_thread) |