#NEWLINE# def test_finished_dont_incr_completed_twice_if_ver_gt_0_and_no_reset( self ) : #NEWLINE# #INDENT# experiment = Experiment . find_or_create ( self . redis , 'link_color' , 'blue' , 'red' ) #NEWLINE# experiment . increment_version ( ) #NEWLINE# alternative_name = ab_test ( 'link_color' , 'blue' , 'red' ) #NEWLINE# finished ( 'link_color' , reset = False ) #NEWLINE# alternative_name = ab_test ( 'link_color' , 'blue' , 'red' ) #NEWLINE# finished ( 'link_color' , reset = False ) #NEWLINE# alternative = Alternative ( self . redis , alternative_name , 'link_color' ) #NEWLINE# completion_count = alternative . completed_count #NEWLINE# assert ( completion_count == 1 )