#NEWLINE# def test_node_create_ext_mac( self ) : #NEWLINE# #INDENT# node1 = self . env . create_node ( api = False ) #NEWLINE# node2_json = { #NEWLINE# #INDENT# 'mac' : self . env . generate_random_mac ( ) , #NEWLINE# 'meta' : self . env . default_metadata ( ) , #NEWLINE# 'status' : 'discover' , #NEWLINE# #UNINDENT# } #NEWLINE# node2_json [ 'meta' ] [ 'interfaces' ] [ 0 ] [ 'mac' ] = node1 . mac #NEWLINE# resp = self . app . post ( reverse ( 'NodeCollectionHandler' ) , jsonutils . dumps ( node2_json ) , headers = resp . default_headers , expect_errors = True ) #NEWLINE# self . assertEqual ( resp . status_code , 409 )