#NEWLINE# def test_valid_response( self ) : #NEWLINE# #INDENT# 'Rendered content should be given in the response.' #NEWLINE# data = self . get_valid_data ( ) #NEWLINE# response = self . client . post ( self . url , data = data ) #NEWLINE# self . assertEqual ( response . status_code , 200 ) #NEWLINE# results = json . loads ( response . content . decode ( 'utf-8' ) ) #NEWLINE# self . assertTrue ( results [ 'valid' ] ) #NEWLINE# self . assertFalse ( ( 'error' in results ) ) #NEWLINE# self . assertEqual ( results [ 'html' ] , '{0}' . format ( date . today ( ) . year ) )