#NEWLINE# def test_new_short_thread_errors( self ) : #NEWLINE# #INDENT# 'Posting a short new thread shows errors.' #NEWLINE# f = ForumFactory ( ) #NEWLINE# u = UserFactory ( ) #NEWLINE# self . client . login ( username = u . username , password = 'testpass' ) #NEWLINE# response = post ( self . client , 'forums.new_thread' , { #NEWLINE# #INDENT# 'title' : 'wha?' , #NEWLINE# 'content' : 'wha?' , #NEWLINE# #UNINDENT# } , args = [ f . slug ] ) #NEWLINE# doc = pq ( doc . content ) #NEWLINE# errors = doc ( 'ul.errorlist li a' ) #NEWLINE# eq_ ( errors [ 0 ] . text , ( 'Your title is too short (4 characters). ' + 'It must be at least 5 characters.' ) ) #NEWLINE# eq_ ( errors [ 1 ] . text , ( 'Your message is too short (4 characters). ' + 'It must be at least 5 characters.' ) )