#NEWLINE# def test_nodes_from_config( self ) : #NEWLINE# #INDENT# config = { #NEWLINE# #INDENT# 'PSDASH_NODES' : [ { #NEWLINE# #INDENT# 'name' : 'test-node' , #NEWLINE# 'host' : 'remotehost.org' , #NEWLINE# 'port' : 5000 , #NEWLINE# #UNINDENT# } ] , #NEWLINE# #UNINDENT# } #NEWLINE# r = PsDashRunner ( config ) #NEWLINE# self . assertEqual ( len ( r . get_nodes ( ) ) , 2 ) #NEWLINE# self . assertIn ( 'remotehost.org:5000' , r . get_nodes ( ) ) #NEWLINE# self . assertEqual ( r . get_nodes ( ) [ 'remotehost.org:5000' ] . name , 'test-node' ) #NEWLINE# self . assertEqual ( r . get_nodes ( ) [ 'remotehost.org:5000' ] . host , 'remotehost.org' ) #NEWLINE# self . assertEqual ( r . get_nodes ( ) [ 'remotehost.org:5000' ] . port , 5000 )