#NEWLINE# def test_add_tags( self ) : #NEWLINE# #INDENT# q = QuestionFactory ( ) #NEWLINE# eq_ ( 0 , q . tags . count ( ) ) #NEWLINE# u = UserFactory ( ) #NEWLINE# add_permission ( u , Tag , 'add_tag' ) #NEWLINE# self . client . force_authenticate ( user = u ) #NEWLINE# res = self . client . post ( reverse ( 'question-add-tags' , args = [ q . id ] ) , content_type = 'application/json' , data = json . dumps ( { #NEWLINE# #INDENT# 'tags' : [ 'test' , 'more' , 'tags' ] , #NEWLINE# #UNINDENT# } ) ) #NEWLINE# eq_ ( res . status_code , 200 ) #NEWLINE# eq_ ( 3 , q . tags . count ( ) )