#NEWLINE# def test_serialize_user_level_event( self ) : #NEWLINE# #INDENT# user_subscriptions = [ x for x in utils . get_all_user_subscriptions ( self . user ) ] #NEWLINE# user_subscription = None #NEWLINE# for subscription in user_subscriptions : #NEWLINE# #INDENT# if ( 'comment_replies' in getattr ( subscription , 'event_name' ) ) : #NEWLINE# #INDENT# user_subscription = subscription #NEWLINE# #UNINDENT# #UNINDENT# data = utils . serialize_event ( self . user , event_description = 'comment_replies' , subscription = user_subscription ) #NEWLINE# expected = { #NEWLINE# #INDENT# 'event' : { #NEWLINE# #INDENT# 'title' : 'comment_replies' , #NEWLINE# 'description' : constants . USER_SUBSCRIPTIONS_AVAILABLE [ 'comment_replies' ] , #NEWLINE# 'notificationType' : 'email_transactional' , #NEWLINE# 'parent_notification_type' : None , #NEWLINE# #UNINDENT# } , #NEWLINE# 'kind' : 'event' , #NEWLINE# 'children' : [ ] , #NEWLINE# #UNINDENT# } #NEWLINE# assert_equal ( data , expected )