def setUp(self):
    super(WipeoutServiceDeleteUserModelsTests, self).setUp()
    self.signup(self.USER_1_EMAIL, self.USER_1_USERNAME)
    self.signup(self.USER_2_EMAIL, self.USER_2_USERNAME)
    self.user_1_id = self.get_user_id_from_email(self.USER_1_EMAIL)
    self.user_2_id = self.get_user_id_from_email(self.USER_2_EMAIL)
    user_models.CompletedActivitiesModel(id=self.user_2_id, exploration_ids=[], collection_ids=[]).put()
    user_models.IncompleteActivitiesModel(id=self.user_2_id, exploration_ids=[], collection_ids=[]).put()
    user_models.LearnerPlaylistModel(id=self.user_2_id, exploration_ids=[], collection_ids=[]).put()
    self.user_1_auth_id = self.get_auth_id_from_email(self.USER_1_EMAIL)
    user_data_dict = {'schema_version': 1, 'display_alias': 'display_alias', 'pin': '12345', 'preferred_language_codes': [constants.DEFAULT_LANGUAGE_CODE], 'preferred_site_language_code': None, 'preferred_audio_language_code': None, 'user_id': self.user_1_id}
    new_user_data_dict = {'schema_version': 1, 'display_alias': 'display_alias3', 'pin': '12345', 'preferred_language_codes': [constants.DEFAULT_LANGUAGE_CODE], 'preferred_site_language_code': None, 'preferred_audio_language_code': None, 'user_id': None}
    self.modifiable_user_data = user_domain.ModifiableUserData.from_raw_dict(user_data_dict)
    self.modifiable_new_user_data = user_domain.ModifiableUserData.from_raw_dict(new_user_data_dict)
    user_services.update_multiple_users_data([self.modifiable_user_data])
    self.modifiable_new_user_data.display_alias = 'name'
    self.modifiable_new_user_data.pin = '123'
    self.profile_user_id = user_services.create_new_profiles(self.user_1_auth_id, self.USER_1_EMAIL, [self.modifiable_new_user_data])[0].user_id
    user_models.CompletedActivitiesModel(id=self.profile_user_id, exploration_ids=[], collection_ids=[]).put()
    user_models.IncompleteActivitiesModel(id=self.profile_user_id, exploration_ids=[], collection_ids=[]).put()
    user_models.LearnerPlaylistModel(id=self.profile_user_id, exploration_ids=[], collection_ids=[]).put()
def setUp(self):
    super(WipeoutServiceDeleteUserModelsTests, self).setUp()
    self.signup(self.USER_1_EMAIL, self.USER_1_USERNAME)
    self.signup(self.USER_2_EMAIL, self.USER_2_USERNAME)
    self.user_1_id = self.get_user_id_from_email(self.USER_1_EMAIL)
    self.user_2_id = self.get_user_id_from_email(self.USER_2_EMAIL)
    user_models.CompletedActivitiesModel(id=self.user_2_id, exploration_ids=[], collection_ids=[]).put()
    user_models.IncompleteActivitiesModel(id=self.user_2_id, exploration_ids=[], collection_ids=[]).put()
    user_models.LearnerPlaylistModel(id=self.user_2_id, exploration_ids=[], collection_ids=[]).put()
    self.user_1_auth_id = self.get_auth_id_from_email(self.USER_1_EMAIL)
    user_data_dict = {'schema_version': 1, 'display_alias': 'display_alias', 'pin': '12345', 'preferred_language_codes': [constants.DEFAULT_LANGUAGE_CODE], 'preferred_site_language_code': None, 'preferred_audio_language_code': None, 'user_id': self.user_1_id}
    new_user_data_dict = {'schema_version': 1, 'display_alias': 'display_alias3', 'pin': '12345', 'preferred_language_codes': [constants.DEFAULT_LANGUAGE_CODE], 'preferred_site_language_code': None, 'preferred_audio_language_code': None, 'user_id': None}
    self.modifiable_user_data = user_domain.ModifiableUserData.from_raw_dict(user_data_dict)
    self.modifiable_new_user_data = user_domain.ModifiableUserData.from_raw_dict(new_user_data_dict)
    user_services.update_multiple_users_data([self.modifiable_user_data])
    self.modifiable_new_user_data.display_alias = 'name'
    self.modifiable_new_user_data.pin = '123'
    self.profile_user_id = user_services.create_new_profiles(self.user_1_auth_id, self.USER_1_EMAIL, [self.modifiable_new_user_data])[0].user_id
    user_models.CompletedActivitiesModel(id=self.profile_user_id, exploration_ids=[], collection_ids=[]).put()
    user_models.IncompleteActivitiesModel(id=self.profile_user_id, exploration_ids=[], collection_ids=[]).put()
    user_models.LearnerPlaylistModel(id=self.profile_user_id, exploration_ids=[], collection_ids=[]).put()