#NEWLINE# def test_add_post( self ) : #NEWLINE# #INDENT# self . login ( 'test@mail.com' , 'testpass' ) #NEWLINE# rv = self . client . post ( url_for ( 'blog.add' ) , data = dict ( title = 'Title' , description = 'Desc' , body = '## hello there' ) , follow_redirects = True ) #NEWLINE# assert ( '<h2>hello there</h2>' in self . data ) #NEWLINE# rv = self . client . get ( url_for ( 'blog.get_post_by_slug' , slug = 'some-slug-that-is-not-there' ) ) #NEWLINE# assert ( rv . status_code == 404 )