#NEWLINE# def test_remove_from_category( self ) : #NEWLINE# #INDENT# user = create_user ( ) #NEWLINE# cat = create_category ( ) #NEWLINE# article = create_article ( ) #NEWLINE# article . add_to_category ( cat , user ) #NEWLINE# ties = Article . get_ties_for_categories_qs ( [ cat ] ) #NEWLINE# self . assertEqual ( len ( ties ) , 1 ) #NEWLINE# article . remove_from_category ( cat ) #NEWLINE# ties = Article . get_ties_for_categories_qs ( [ cat ] ) #NEWLINE# self . assertEqual ( len ( ties ) , 0 )