<s> from __future__ import absolute_import <EOL> from exam import fixture <EOL> from sentry . testutils import TestCase <EOL> from sentry . interfaces . message import Message <EOL> class MessageTest ( TestCase ) : <EOL> @ fixture <EOL> def interface ( self ) : <EOL> return Message . to_python ( dict ( <EOL> message = '<STR_LIT>' , <EOL> params = ( '<STR_LIT>' , ) <EOL> ) ) <EOL> def test_serialize_behavior ( self ) : <EOL> assert self . interface . to_json ( ) == { <EOL> '<STR_LIT:message>' : self . interface . message , <EOL> '<STR_LIT>' : self . interface . params , <EOL> } <EOL> def test_get_hash_uses_message ( self ) : <EOL> assert self . interface . get_hash ( ) == [ self . interface . message ] <EOL> def test_serialize_unserialize_behavior ( self ) : <EOL> result = type ( self . interface ) . to_python ( self . interface . to_json ( ) ) <EOL> assert result . to_json ( ) == self . interface . to_json ( ) </s>
