#NEWLINE# def test_group_by_tenant( self ) : #NEWLINE# #INDENT# group_rules = '\n        group_by:\n            - tenant\n        ' #NEWLINE# self . make_group_file ( group_rules ) #NEWLINE# group = grouping . Grouping ( FAKE_CONFIG , FILE_NAME , 'src' ) #NEWLINE# group . compute . get_instances_list . return_value = [ self . fake_instance1 , self . fake_instance2 , self . fake_instance3 ] #NEWLINE# group . group ( ) #NEWLINE# expected_result = { #NEWLINE# #INDENT# 't2' : [ 's2' ] , #NEWLINE# 't1' : [ 's1' , 's3' ] , #NEWLINE# #UNINDENT# } #NEWLINE# result = utils . read_yaml_file ( RESULT_FILE ) #NEWLINE# self . assertEquals ( expected_result , result )