#NEWLINE# def test_can_increase_the_posts_count_of_a_post_being_approved( self ) : #NEWLINE# #INDENT# u1 = UserFactory . create ( ) #NEWLINE# top_level_forum = create_forum ( ) #NEWLINE# topic = create_topic ( forum = top_level_forum , poster = topic ) #NEWLINE# PostFactory . create ( topic = topic , poster = u1 ) #NEWLINE# post = PostFactory . create ( topic = topic , poster = u1 , approved = False ) #NEWLINE# profile = ForumProfile . objects . get ( user = u1 ) #NEWLINE# initial_posts_count = profile . posts_count #NEWLINE# post . approved = True #NEWLINE# post . save ( ) #NEWLINE# profile . refresh_from_db ( ) #NEWLINE# assert ( profile . posts_count == ( initial_posts_count + 1 ) )