#NEWLINE# def test_nodes_has_roles_attrs( self ) : #NEWLINE# #INDENT# result = db . execute ( sa . select ( [ self . meta . tables [ 'nodes' ] . c . roles , self . meta . tables [ 'nodes' ] . c . pending_roles , self . meta . tables [ 'nodes' ] . c . primary_roles ] ) . order_by ( self . meta . tables [ 'nodes' ] . c . id ) ) #NEWLINE# nodes = [ ( roles , pending_roles , primary_roles ) for ( roles , pending_roles , primary_roles ) in result ] #NEWLINE# ( roles , pending_roles , primary_roles ) = nodes [ 0 ] #NEWLINE# self . assertItemsEqual ( [ 'controller' , 'mongo' ] , roles ) #NEWLINE# self . assertItemsEqual ( [ ] , pending_roles ) #NEWLINE# self . assertItemsEqual ( [ ] , primary_roles ) #NEWLINE# ( roles , pending_roles , primary_roles ) = nodes [ 1 ] #NEWLINE# self . assertItemsEqual ( [ 'controller' ] , roles ) #NEWLINE# self . assertItemsEqual ( [ 'mongo' ] , pending_roles ) #NEWLINE# self . assertItemsEqual ( [ 'mongo' ] , primary_roles ) #NEWLINE# ( roles , pending_roles , primary_roles ) = nodes [ 2 ] #NEWLINE# self . assertItemsEqual ( [ 'controller' ] , roles ) #NEWLINE# self . assertItemsEqual ( [ 'mongo' ] , pending_roles ) #NEWLINE# self . assertItemsEqual ( [ 'controller' ] , primary_roles )