#NEWLINE# def test_delete_page_view( self ) : #NEWLINE# #INDENT# self . client . login ( username = 'admin' , password = 'admin' ) #NEWLINE# url = test_reverse ( 'wa-page' , args = [ 1 ] ) #NEWLINE# response = self . client . delete ( url ) #NEWLINE# self . assertEqual ( response . status_code , 400 ) #NEWLINE# page_20 = Page . objects . get ( pk = 20 ) . get_absolute_url ( ) #NEWLINE# url = ( page_20 [ : ( - 1 ) ] + test_reverse ( 'wa-page' , args = [ 20 ] ) ) #NEWLINE# response = self . client . delete ( url ) #NEWLINE# self . assertEqual ( response . status_code , 202 ) #NEWLINE# url = test_reverse ( 'wa-page' , args = [ 10 ] ) #NEWLINE# response = self . client . delete ( url ) #NEWLINE# self . assertEqual ( response . status_code , 200 )