#NEWLINE# @ patch . object ( SQLAlchemyBackend , 'is_verified_human' , Mock ( return_value = True ) ) #NEWLINE# def test_verified_participate_multiple( self ) : #NEWLINE# #INDENT# b = self . b #NEWLINE# b . save_experiment ( 'text_size' , ( 'small' , 'medium' , 'large' ) ) #NEWLINE# b . participate ( 'ryan' , 'text_size' , 'medium' ) #NEWLINE# b . participate ( 'ryan' , 'text_size' , 'medium' ) #NEWLINE# b . participate ( 'ryan' , 'text_size' , 'medium' ) #NEWLINE# people = model . Participant . query . all ( ) #NEWLINE# assert ( len ( people ) == 1 ) #NEWLINE# assert ( people [ 0 ] . identity == 'ryan' ) #NEWLINE# assert ( people [ 0 ] . experiment . name == 'text_size' ) #NEWLINE# assert ( people [ 0 ] . variant . name == 'medium' ) #NEWLINE# participations = model . TrackedEvent . query . filter_by ( type = 'PARTICIPANT' ) . all ( ) #NEWLINE# assert ( len ( participations ) == 1 ) #NEWLINE# assert ( participations [ 0 ] . experiment . name == 'text_size' ) #NEWLINE# assert ( self [ 0 ] . variant . name == 'medium' ) #NEWLINE# assert ( participations [ 0 ] . total == 3 )