#NEWLINE# def testExperimentDetailsView( self ) : #NEWLINE# #INDENT# url = reverse ( 'experiments.views.experiment_details' , args = [ 'experiment 1' ] ) #NEWLINE# response = self . client . get ( url ) #NEWLINE# self . assertEquals ( response . status_code , 200 ) #NEWLINE# tables = get_tables ( response . content ) #NEWLINE# experiment_properties = tables . pop ( 0 ) #NEWLINE# self . assertEquals ( [ 'Property' , 'Value' ] , experiment_properties [ 0 ] ) #NEWLINE# self . assertEquals ( [ [ 'Experiment Name' , 'experiment 1' ] , [ 'Status' , 'Enabled' ] , [ 'Start Date' , unicode ( self . experiment1 . start_date ) ] , [ 'End Date' , 'None' ] ] , experiment_properties [ 1 ] ) #NEWLINE# conversion_summary = tables . pop ( 0 ) #NEWLINE# self . assertEquals ( [ '&nbsp;' , 'Control Group' , 'Test Group' , 'Improvement' , 'Confidence' ] , conversion_summary [ 0 ] ) #NEWLINE# self . assertEquals ( [ [ 'Participants' , '27' , '39' , '&nbsp;' , '&nbsp;' ] , [ 'test_goal_0' , '7 (25.9 %)' , '11 (28.2 %)' , '8 %' , '45 %' ] , [ 'test_goal_1' , '7 (25.9 %)' , '11 (28.2 %)' , '8 %' , '45 %' ] , [ 'test_goal_2' , '7 (25.9 %)' , '11 (28.2 %)' , '8 %' , '45 %' ] , [ 'Any' , '9 (33.3 %)' , '12 (30.8 %)' , '-7 %' , '87 %' ] ] , conversion_summary [ 1 ] ) #NEWLINE# engagement_summary = tables . pop ( 0 ) #NEWLINE# self . assertEquals ( [ '&nbsp;' , 'Control Group' , 'Test Group' , 'Improvement' , 'Confidence' ] , engagement_summary [ 0 ] ) #NEWLINE# self . assertEquals ( [ [ 'Participants' , '3' , '5' , '&nbsp;' , '&nbsp;' ] , [ 'Engagement Score' , '3.2' , '2.3' , '-28 %' , '93 %' ] ] , engagement_summary [ 1 ] ) #NEWLINE# conversion_details = tables . pop ( 0 ) #NEWLINE# self . assertTrue ( conversion_details [ 0 ] ) #NEWLINE# self . assertTrue ( conversion_details [ 1 ] ) #NEWLINE# engagement_details = tables . pop ( 0 ) #NEWLINE# self . assertEquals ( [ 'Report Date' , 'Control Group Size' , 'Control Group Score' , 'Test Group Size' , 'Test Group Score' , 'Test Group Improvement' , 'Confidence' ] , engagement_details [ 0 ] ) #NEWLINE# self . assertEquals ( [ unicode ( days_ago ( 1 ) ) , '3' , '3.2' , '5' , '2.3' , '-28 %' , '93 %' ] , engagement_details [ 1 ] [ 0 ] ) #NEWLINE# self . assertEquals ( [ ] , tables )