#NEWLINE# def test_view_empty_ip( self ) : #NEWLINE# #INDENT# if ( settings . DATABASES [ 'default' ] [ 'ENGINE' ] == 'django.db.backends.postgresql_psycopg2' ) : #NEWLINE# #INDENT# with open ( PB_FILE , 'rb' ) as f : #NEWLINE# #INDENT# body = f . read ( ) #NEWLINE# #UNINDENT# description = 'Testable issue\nwith multiple lines\nof code' #NEWLINE# email = 'user@example.com' #NEWLINE# page_url = 'chrome://newtab/' #NEWLINE# self . assertEqual ( Feedback . objects . all ( ) . count ( ) , 0 ) #NEWLINE# response = self . client . post ( reverse ( 'feedback' ) , data = body , content_type = 'application/x-protobuf' , REMOTE_ADDR = '' ) #NEWLINE# self . assertEqual ( response . status_code , 200 ) #NEWLINE# self . assertEqual ( Feedback . objects . all ( ) . count ( ) , 1 ) #NEWLINE# obj = Feedback . objects . get ( ) #NEWLINE# self . assertEqual ( response . content . decode ( ) , str ( obj . pk ) ) #NEWLINE# self . assertEqual ( obj . description , description ) #NEWLINE# self . assertEqual ( obj . email , email ) #NEWLINE# self . assertEqual ( obj . page_url , page_url ) #NEWLINE# self . assertTrue ( obj . screenshot ) #NEWLINE# self . assertTrue ( obj . blackbox ) #NEWLINE# self . assertTrue ( obj . system_logs ) #NEWLINE# self . assertTrue ( obj . attached_file ) #NEWLINE# self . assertTrue ( obj . feedback_data ) #NEWLINE# self . assertEqual ( obj . ip , None )