#NEWLINE# def test_with_has_addon( self ) : #NEWLINE# #INDENT# user = UserProfile . objects . create ( username = 'uhhh' , email = 'uh@hh' ) #NEWLINE# collection = Collection . objects . create ( author = user ) #NEWLINE# addon = Addon . objects . all ( ) [ 0 ] #NEWLINE# qset = Collection . objects . filter ( pk = collection . id ) . with_has_addon ( addon . id ) #NEWLINE# assert ( not qset . first ( ) . has_addon ) #NEWLINE# collection . add_addon ( addon ) #NEWLINE# assert qset . first ( ) . has_addon