#NEWLINE# def test_versioning_for_default_exploration( self ) : #NEWLINE# #INDENT# 'Test retrieval of old exploration versions.' #NEWLINE# reader_dict = self . get_json ( ( '%s/%s' % ( feconf . EXPLORATION_INIT_URL_PREFIX , self . EXP_ID ) ) ) #NEWLINE# init_state_name = reader_dict [ 'exploration' ] [ 'init_state_name' ] #NEWLINE# init_state_data = reader_dict [ 'exploration' ] [ 'states' ] [ init_state_name ] #NEWLINE# init_content = init_state_data [ 'content' ] [ 0 ] [ 'value' ] #NEWLINE# self . assertIn ( 'ABC' , init_content ) #NEWLINE# self . assertNotIn ( 'Hi, welcome to Oppia!' , init_content ) #NEWLINE# reader_dict = self . get_json ( ( '%s/%s?v=1' % ( feconf . EXPLORATION_INIT_URL_PREFIX , self . EXP_ID ) ) ) #NEWLINE# init_state_name = reader_dict [ 'exploration' ] [ 'init_state_name' ] #NEWLINE# init_state_data = reader_dict [ 'exploration' ] [ 'states' ] [ init_state_name ] #NEWLINE# init_content = init_state_data [ 'content' ] [ 0 ] [ 'value' ] #NEWLINE# self . assertIn ( 'Hi, welcome to Oppia!' , init_content ) #NEWLINE# self . assertNotIn ( 'ABC' , init_content ) #NEWLINE# reader_dict = self . get_json ( ( '%s/%s?v=2' % ( feconf . EXPLORATION_INIT_URL_PREFIX , self . EXP_ID ) ) ) #NEWLINE# init_state_name = reader_dict [ 'exploration' ] [ 'init_state_name' ] #NEWLINE# init_state_data = reader_dict [ 'exploration' ] [ 'states' ] [ init_state_name ] #NEWLINE# init_content = init_state_data [ 'content' ] [ 0 ] [ 'value' ] #NEWLINE# self . assertIn ( 'ABC' , init_content ) #NEWLINE# self . assertNotIn ( 'Hi, welcome to Oppia!' , init_content ) #NEWLINE# response = self . testapp . get ( ( '%s/%s?v=3' % ( feconf . EXPLORATION_INIT_URL_PREFIX , self . EXP_ID ) ) , expect_errors = True ) #NEWLINE# self . assertEqual ( response . status_int , 404 )