#NEWLINE# def test_invalid_template( self ) : #NEWLINE# #INDENT# 'Data should not be saved if the template is invalid.' #NEWLINE# data = self . get_valid_data ( ) #NEWLINE# data [ 'content' ] = '{% now %}' #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 . assertFalse ( results [ 'valid' ] ) #NEWLINE# self . assertEqual ( Scribble . objects . count ( ) , 0 )