def test__identical_input_and_failed_first_job(self): # The exposure model input is not found since the first job to have # used it has failed. self._setup_input( input_type="exposure", size=123, path=self.SRC_MODEL, digest="0" * 32, jobs=self.failed_jobs_u1) actual = engine._identical_input("exposure", "0" * 32, self.job.owner.id) self.assertIs(None, actual)
def test__identical_input_and_owner_differing_from_user(self): # The exposure model input is not found since its owner is not the user # that is running the current job. self._setup_input( input_type="exposure", size=123, path=self.SRC_MODEL, digest="0" * 32, jobs=self.jobs_u2) actual = engine._identical_input("exposure", "0" * 32, self.job.owner.id) self.assertIs(None, actual)
def test__identical_input_and_non_matching_digest(self): # The exposure model input is not found since the md5sum digest does # not match. self._setup_input( input_type="exposure", size=123, path=self.SRC_MODEL, digest="0" * 32, jobs=self.jobs_u1) actual = engine._identical_input("exposure", "x" * 32, self.job.owner.id) self.assertIs(None, actual)