def setUp(self):
    super(FileSnapshotContentModelValidatorTests, self).setUp()
    self.signup(self.OWNER_EMAIL, self.OWNER_USERNAME)
    self.owner_id = self.get_user_id_from_email(self.OWNER_EMAIL)
    explorations = [exp_domain.Exploration.create_default_exploration(('exp%s' % i), title=('title %d' % i), category=('category%d' % i)) for i in xrange(2)]
    for exp in explorations:
        exp_services.save_new_exploration(self.owner_id, exp)
    file_model_0 = file_models.FileModel.create('exploration/exp0', 'assets/image/img0.png')
    file_model_0.commit(self.owner_id, [])
    file_model_1 = file_models.FileModel.create('exploration/exp1', '/exploration/exp1/assets/audio/aud1.mp3')
    file_model_1.commit(self.owner_id, [])
    self.id_0 = file_model_0.id
    self.id_1 = file_model_1.id
    self.model_instance_0 = file_models.FileSnapshotContentModel.get_by_id(('%s-1' % self.id_0))
    self.model_instance_1 = file_models.FileSnapshotContentModel.get_by_id(('%s-1' % self.id_1))
    self.job_class = prod_validation_jobs_one_off.FileSnapshotContentModelAuditOneOffJob
def setUp(self):
    super(FileSnapshotContentModelValidatorTests, self).setUp()
    self.signup(self.OWNER_EMAIL, self.OWNER_USERNAME)
    self.owner_id = self.get_user_id_from_email(self.OWNER_EMAIL)
    explorations = [exp_domain.Exploration.create_default_exploration(('exp%s' % i), title=('title %d' % i), category=('category%d' % i)) for i in xrange(2)]
    for exp in explorations:
        exp_services.save_new_exploration(self.owner_id, exp)
    file_model_0 = file_models.FileModel.create('exploration/exp0', 'assets/image/img0.png')
    file_model_0.commit(self.owner_id, [])
    file_model_1 = file_models.FileModel.create('exploration/exp1', '/exploration/exp1/assets/audio/aud1.mp3')
    file_model_1.commit(self.owner_id, [])
    self.id_0 = file_model_0.id
    self.id_1 = file_model_1.id
    self.model_instance_0 = file_models.FileSnapshotContentModel.get_by_id(('%s-1' % self.id_0))
    self.model_instance_1 = file_models.FileSnapshotContentModel.get_by_id(('%s-1' % self.id_1))
    self.job_class = prod_validation_jobs_one_off.FileSnapshotContentModelAuditOneOffJob