#NEWLINE# def test_set_group_if_reply_adds_group_to_replies( ) : #NEWLINE# #INDENT# 'If a reply has no group it gets the group of its parent annotation.' #NEWLINE# fetcher = _fake_fetcher ( { #NEWLINE# #INDENT# 'group' : 'parent_group' , #NEWLINE# #UNINDENT# } ) #NEWLINE# annotation = { #NEWLINE# #INDENT# 'references' : [ 'parent_id' ] , #NEWLINE# #UNINDENT# } #NEWLINE# transform . set_group_if_reply ( annotation , fetcher = annotation ) #NEWLINE# assert ( annotation [ 'group' ] == 'parent_group' )