<s> from __future__ import absolute_import <EOL> from __future__ import division <EOL> from __future__ import print_function <EOL> import unittest <EOL> from ddp . messages . client . method_message import MethodMessage <EOL> from ddp . messages . client . method_message_serializer import ( <EOL> MethodMessageSerializer ) <EOL> class MethodMessageSerializerTestCase ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> self . serializer = MethodMessageSerializer ( ) <EOL> def test_serialize ( self ) : <EOL> id = '<STR_LIT:id>' <EOL> method = '<STR_LIT>' <EOL> params = [ '<STR_LIT>' ] <EOL> message = MethodMessage ( id , method , params ) <EOL> actual = self . serializer . serialize ( message ) <EOL> expected = { '<STR_LIT>' : '<STR_LIT>' , '<STR_LIT:id>' : id , '<STR_LIT>' : method , <EOL> '<STR_LIT>' : params } <EOL> self . assertEqual ( actual , expected ) </s>
