#NEWLINE# def test_visit_incorporate( self ) : #NEWLINE# #INDENT# alternative = participant ( self . request ) . enroll ( self . experiment . name , [ 'alternative' ] ) #NEWLINE# ExperimentsRetentionMiddleware ( ) . process_response ( self . request , HttpResponse ( ) ) #NEWLINE# self . assertEqual ( dict ( self . experiment_counter . participant_goal_frequencies ( self . experiment , self , participant ( self . request ) . _participant_identifier ( ) ) ) [ conf . VISIT_NOT_PRESENT_COUNT_GOAL ] , 1 ) #NEWLINE# self . assertFalse ( Enrollment . objects . all ( ) . exists ( ) ) #NEWLINE# self . _login ( ) #NEWLINE# self . assertTrue ( Enrollment . objects . all ( ) . exists ( ) ) #NEWLINE# self . assertIsNotNone ( Enrollment . objects . all ( ) [ 0 ] . last_seen ) #NEWLINE# self . assertEqual ( dict ( self . experiment_counter . participant_goal_frequencies ( self . experiment , alternative , participant ( self . request ) . _participant_identifier ( ) ) ) [ conf . VISIT_NOT_PRESENT_COUNT_GOAL ] , 1 ) #NEWLINE# self . assertEqual ( self . experiment_counter . goal_count ( self . experiment , alternative , conf . VISIT_NOT_PRESENT_COUNT_GOAL ) , 1 ) #NEWLINE# self . assertEqual ( self . experiment_counter . participant_count ( self . experiment , alternative ) , 1 )