#NEWLINE# @ pytest . mark . parametrize ( 'status_code' , [ 200 , 202 , 204 ] ) #NEWLINE# def test_HALNavigator__delete( status_code ) : #NEWLINE# #INDENT# with httprettify ( ) as HTTPretty : #NEWLINE# #INDENT# index_uri = 'http://www.example.com/api/' #NEWLINE# hosts_uri = ( index_uri + 'hosts' ) #NEWLINE# index_links = { #NEWLINE# #INDENT# 'hosts' : { #NEWLINE# #INDENT# 'href' : hosts_uri , #NEWLINE# 'method' : 'DELETE' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# register_hal ( index_uri , index_links ) #NEWLINE# HTTPretty . register_uri ( 'DELETE' , uri = hosts_uri , status = status_code ) #NEWLINE# N = HN . Navigator . hal ( index_uri ) #NEWLINE# N2 = N [ 'hosts' ] . delete ( ) #NEWLINE# assert ( HTTPretty . last_request . method == 'DELETE' ) #NEWLINE# assert ( HTTPretty . last_request . body == b'' ) #NEWLINE# assert ( N2 . self == None ) #NEWLINE# assert ( N2 . parent . uri == hosts_uri ) #NEWLINE# assert N2 . fetched