#NEWLINE# def assert_created( response , location , data = None ) : #NEWLINE# #INDENT# output = response . json ( ) #NEWLINE# assert ( response . status_code == 201 ) #NEWLINE# assert ( output [ 'status' ] == 'created' ) #NEWLINE# assert ( response . headers . get ( 'Location' ) == location ) #NEWLINE# if ( output is not None ) : #NEWLINE# #INDENT# assert ( output == data )