def setUp(self):
    super(ActivityReferencesModelValidatorTests, self).setUp()
    self.signup(self.OWNER_EMAIL, self.OWNER_USERNAME)
    self.owner_id = self.get_user_id_from_email(self.OWNER_EMAIL)
    self.owner = user_services.UserActionsInfo(self.owner_id)
    exploration = exp_domain.Exploration.create_default_exploration('1exp', title='title', category='category')
    exp_services.save_new_exploration(self.owner_id, exploration)
    collection = collection_domain.Collection.create_default_collection('1col', title='title', category='category')
    collection_services.save_new_collection(self.owner_id, collection)
    self.model_instance = activity_models.ActivityReferencesModel.get_or_create('featured')
    self.model_instance.activity_references = [{'type': constants.ACTIVITY_TYPE_EXPLORATION, 'id': '1exp'}, {'type': constants.ACTIVITY_TYPE_COLLECTION, 'id': '1col'}]
    self.model_instance.put()
    self.job_class = prod_validation_jobs_one_off.ActivityReferencesModelAuditOneOffJob
def setUp(self):
    super(ActivityReferencesModelValidatorTests, self).setUp()
    self.signup(self.OWNER_EMAIL, self.OWNER_USERNAME)
    self.owner_id = self.get_user_id_from_email(self.OWNER_EMAIL)
    self.owner = user_services.UserActionsInfo(self.owner_id)
    exploration = exp_domain.Exploration.create_default_exploration('1exp', title='title', category='category')
    exp_services.save_new_exploration(self.owner_id, exploration)
    collection = collection_domain.Collection.create_default_collection('1col', title='title', category='category')
    collection_services.save_new_collection(self.owner_id, collection)
    self.model_instance = activity_models.ActivityReferencesModel.get_or_create('featured')
    self.model_instance.activity_references = [{'type': constants.ACTIVITY_TYPE_EXPLORATION, 'id': '1exp'}, {'type': constants.ACTIVITY_TYPE_COLLECTION, 'id': '1col'}]
    self.model_instance.put()
    self.job_class = prod_validation_jobs_one_off.ActivityReferencesModelAuditOneOffJob