#NEWLINE# def test_assign_nodegroup_to_node_not_in_cluster( self ) : #NEWLINE# #INDENT# node = self . env . create_node ( ) #NEWLINE# resp = self . env . create_node_group ( ) #NEWLINE# ng_id = resp . json_body [ 'id' ] #NEWLINE# resp = self . app . put ( reverse ( 'NodeHandler' , kwargs = { #NEWLINE# #INDENT# 'obj_id' : node [ 'id' ] , #NEWLINE# #UNINDENT# } ) , json . dumps ( { #NEWLINE# #INDENT# 'group_id' : ng_id , #NEWLINE# #UNINDENT# } ) , headers = self . default_headers , expect_errors = True ) #NEWLINE# message = resp . json_body [ 'message' ] #NEWLINE# self . assertEquals ( resp . status_code , 400 ) #NEWLINE# self . assertRegexpMatches ( message , 'Cannot assign node group' )