#NEWLINE# def test_service_get_all_by_topic( self ) : #NEWLINE# #INDENT# values = [ { #NEWLINE# #INDENT# 'host' : 'host1' , #NEWLINE# 'topic' : 't1' , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'host' : 'host2' , #NEWLINE# 'topic' : 't1' , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'disabled' : True , #NEWLINE# 'topic' : 't1' , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'host' : 'host3' , #NEWLINE# 'topic' : 't2' , #NEWLINE# #UNINDENT# } ] #NEWLINE# services = [ self . _create_service ( vals ) for vals in values ] #NEWLINE# expected = expected [ : 2 ] #NEWLINE# real = db . service_get_all_by_topic ( self . ctxt , 't1' ) #NEWLINE# self . _assertEqualListsOfObjects ( expected , real )