

def test_collaborators_can_see_explorations(self):
    self.save_new_default_exploration(self.EXP_ID, self.owner_id, title=self.EXP_TITLE)
    rights_manager.assign_role_for_exploration(self.owner_id, self.EXP_ID, self.collaborator_id, rights_manager.ROLE_EDITOR)
    self.set_admins([self.OWNER_USERNAME])
    self.login(self.COLLABORATOR_EMAIL)
    response = self.get_json(self.MY_EXPLORATIONS_DATA_URL)
    self.assertEqual(len(response['explorations_list']), 1)
    self.assertEqual(response['explorations_list'][0]['status'], rights_manager.ACTIVITY_STATUS_PRIVATE)
    rights_manager.publish_exploration(self.owner_id, self.EXP_ID)
    response = self.get_json(self.MY_EXPLORATIONS_DATA_URL)
    self.assertEqual(len(response['explorations_list']), 1)
    response.assertEqual(response['explorations_list'][0]['status'], rights_manager.ACTIVITY_STATUS_PUBLIC)
    rights_manager.publicize_exploration(self.owner_id, self.EXP_ID)
    response = self.get_json(self.MY_EXPLORATIONS_DATA_URL)
    self.assertEqual(len(response['explorations_list']), 1)
    self.assertEqual(response['explorations_list'][0]['status'], rights_manager.ACTIVITY_STATUS_PUBLICIZED)
    self.logout()

dataset/ETHPy150Open oppia/oppia/core/controllers/home_test.py MyExplorationsHandlerTest.test_collaborators_can_see_explorations/VarMisuse@155/245 `self`->`response`