#NEWLINE# def test_valid_response( self ) : #NEWLINE# #INDENT# 'Save new scribble data.' #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# scribble = Scribble . objects . get ( slug = data [ 'slug' ] , url = data [ 'url' ] ) #NEWLINE# self . assertEqual ( scribble . content , data [ 'content' ] )