def setUp(self):
    super(CollectionCommitLogEntryModelValidatorTests, 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(('%s' % i), title=('title %d' % i), category=('category%d' % i)) for i in xrange(6)]
    for exp in explorations:
        exp_services.save_new_exploration(self.owner_id, exp)
    collections = [collection_domain.Collection.create_default_collection(('%s' % i), title=('title %d' % i), category=('category%d' % i), objective=('objective%d' % i)) for i in xrange(3)]
    for (index, collection) in enumerate(collections):
        collection.add_node(('%s' % (index * 2)))
        collection.add_node(('%s' % ((index * 2) + 1)))
        collection_services.save_new_collection(self.owner_id, collection)
    self.rights_model_instance = collection_models.CollectionCommitLogEntryModel(id='rights-1-1', user_id=self.owner_id, username=self.OWNER_USERNAME, collection_id='1', commit_type='edit', commit_message='', commit_cmds=[], post_commit_status=constants.ACTIVITY_STATUS_PUBLIC, post_commit_community_owned=False, post_commit_is_private=False)
    self.rights_model_instance.put()
    self.model_instance_0 = collection_models.CollectionCommitLogEntryModel.get_by_id('collection-0-1')
    self.model_instance_1 = collection_models.CollectionCommitLogEntryModel.get_by_id('collection-1-1')
    self.model_instance_2 = collection_models.CollectionCommitLogEntryModel.get_by_id('collection-2-1')
    self.job_class = prod_validation_jobs_one_off.CollectionCommitLogEntryModelAuditOneOffJob
def setUp(self):
    super(CollectionCommitLogEntryModelValidatorTests, 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(('%s' % i), title=('title %d' % i), category=('category%d' % i)) for i in xrange(6)]
    for exp in explorations:
        exp_services.save_new_exploration(self.owner_id, exp)
    collections = [collection_domain.Collection.create_default_collection(('%s' % i), title=('title %d' % i), category=('category%d' % i), objective=('objective%d' % i)) for i in xrange(3)]
    for (index, collection) in enumerate(collections):
        collection.add_node(('%s' % (index * 2)))
        collection.add_node(('%s' % ((index * 2) + 1)))
        collection_services.save_new_collection(self.owner_id, collection)
    self.rights_model_instance = collection_models.CollectionCommitLogEntryModel(id='rights-1-1', user_id=self.owner_id, username=self.OWNER_USERNAME, collection_id='1', commit_type='edit', commit_message=, commit_cmds=[], post_commit_status=constants.ACTIVITY_STATUS_PUBLIC, post_commit_community_owned=False, post_commit_is_private=False)
    self.rights_model_instance.put()
    self.model_instance_0 = collection_models.CollectionCommitLogEntryModel.get_by_id('collection-0-1')
    self.model_instance_1 = collection_models.CollectionCommitLogEntryModel.get_by_id('collection-1-1')
    self.model_instance_2 = collection_models.CollectionCommitLogEntryModel.get_by_id('collection-2-1')
    self.job_class = prod_validation_jobs_one_off.CollectionCommitLogEntryModelAuditOneOffJob