def process_emulate(self): self.tarfile.close() self.buffer.close() upload = SigningUpload() # Under no circumstances is it safe to execute actual commands. self.fake_call = FakeMethod(result=0) upload.callLog = FakeMethodCallLog(upload=upload) self.useFixture(MonkeyPatch("subprocess.call", self.fake_call)) upload.process(self.archive, self.path, self.suite) return upload
def process(self): self.tarfile.close() self.buffer.close() upload = SigningUpload() upload.signUefi = FakeMethod() upload.signKmod = FakeMethod() upload.signOpal = FakeMethod() # Under no circumstances is it safe to execute actual commands. fake_call = FakeMethod(result=0) self.useFixture(MonkeyPatch("subprocess.call", fake_call)) upload.process(self.archive, self.path, self.suite) self.assertEqual(0, fake_call.call_count) return upload