#NEWLINE# def test_node_create_mac_validation( self ) : #NEWLINE# #INDENT# maccaddresses = ( ( '60a44c3528ff' , 400 ) , ( '60:a4:4c:35:28' , 400 ) , ( '60:a4:4c:35:28:fg' , 400 ) , ( '76:DC:7C:CA:G4:75' , 400 ) , ( '76-DC-7C-CA-G4-75' , 400 ) , ( '60:a4:4c:35:28:ff' , 201 ) , ( '48-2C-6A-1E-59-3D' , 201 ) ) #NEWLINE# for ( mac , http_code ) in maccaddresses : #NEWLINE# #INDENT# response = self . app . post ( reverse ( 'NodeCollectionHandler' ) , jsonutils . dumps ( { #NEWLINE# #INDENT# 'mac' : mac , #NEWLINE# 'status' : 'discover' , #NEWLINE# #UNINDENT# } ) , headers = self . default_headers , expect_errors = ( http_code != 201 ) ) #NEWLINE# self . assertEqual ( response . status_code , http_code )