#NEWLINE# def test_create_article_with_errors( self ) : #NEWLINE# #INDENT# '\n        POSTs a form that contains validation errors.\n        ' #NEWLINE# view_url = '/views/create_update/create/article/' #NEWLINE# num_articles = Article . objects . count ( ) #NEWLINE# response = self . client . post ( view_url , { #NEWLINE# #INDENT# 'title' : 'My First Article' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertFormError ( num_articles , 'form' , 'slug' , [ 'This field is required.' ] ) #NEWLINE# self . assertTemplateUsed ( response , 'views/article_form.html' ) #NEWLINE# self . assertEqual ( num_articles , Article . objects . count ( ) , 'Number of Articles should not have changed.' )