#NEWLINE# def test_create( client ) : #NEWLINE# #INDENT# response = helpers . request ( client , 'POST' , '/widgets' , { #NEWLINE# #INDENT# 'id_1' : '4' , #NEWLINE# 'id_2' : '6' , #NEWLINE# 'name' : 'Qux' , #NEWLINE# #UNINDENT# } ) #NEWLINE# assert ( response . status_code == 201 ) #NEWLINE# assert ( response . headers [ 'Location' ] == 'http://localhost/widgets/4/6' ) #NEWLINE# assert ( helpers . get_data ( client ) == { #NEWLINE# #INDENT# 'id_1' : '4' , #NEWLINE# 'id_2' : '6' , #NEWLINE# 'name' : 'Qux' , #NEWLINE# #UNINDENT# } )