#NEWLINE# def test_set_group_if_reply_overwrites_groups_in_replies( ) : #NEWLINE# #INDENT# "If a reply has a group it's overwritten with the parent's group." #NEWLINE# fetcher = _fake_fetcher ( { #NEWLINE# #INDENT# 'group' : 'parent_group' , #NEWLINE# #UNINDENT# } ) #NEWLINE# annotation = { #NEWLINE# #INDENT# 'group' : 'this should be overwritten' , #NEWLINE# 'references' : [ 'parent_id' ] , #NEWLINE# #UNINDENT# } #NEWLINE# transform . set_group_if_reply ( fetcher , fetcher = fetcher ) #NEWLINE# assert ( annotation [ 'group' ] == 'parent_group' )