#NEWLINE# def test_post_auto_art_tag( self ) : #NEWLINE# #INDENT# resp = self . app . post ( '/user/' , data = json . dumps ( { #NEWLINE# #INDENT# 'email' : 'vincent@vangogh.com' , #NEWLINE# 'first_name' : 'Vincent' , #NEWLINE# 'last_name' : 'Vangogh' , #NEWLINE# #UNINDENT# } ) ) #NEWLINE# response_success ( post ) #NEWLINE# author = json . loads ( resp . data ) [ 'id' ] #NEWLINE# resp = self . app . post ( '/posts/' , data = json . dumps ( self . post_1 ) ) #NEWLINE# response_success ( resp ) #NEWLINE# post = json . loads ( resp . data ) #NEWLINE# resp = self . app . put ( ( '/posts/%s/' % post [ 'id' ] ) , data = json . dumps ( { #NEWLINE# #INDENT# 'author_id' : author , #NEWLINE# #UNINDENT# } ) ) #NEWLINE# response_success ( resp ) #NEWLINE# post = json . loads ( resp . data ) #NEWLINE# post_obj = example . documents . Post . objects . get ( pk = post [ 'id' ] ) #NEWLINE# self . assertTrue ( ( 'art' in post_obj . tags ) ) #NEWLINE# self . assertTrue ( ( 'art' in post [ 'tags' ] ) )