def testOk(self): self.mox.StubOutWithMock(glue.corestorage, 'GetRecoveryPartition') glue.corestorage.GetRecoveryPartition().AndReturn('/dev/disk0s3') self.mox.StubOutWithMock(glue.os, 'path') glue.os.path.exists(mox.StrContains('FileVaultMaster')).AndReturn(False) self.mox.ReplayAll() glue.CheckEncryptionPreconditions() self.mox.VerifyAll()
def PlainVolumePrompt(self, skip_welcome=False): """Initial GUI prompt when the volume is plain text.""" try: glue.CheckEncryptionPreconditions() except glue.OptionError as e: self.ShowFatalError(e) else: if skip_welcome: self._EncryptAuth() else: self._EncryptIntro() self.root.mainloop()
def testOk(self, get_recovery_partition_mock, exists_mock, _): glue.CheckEncryptionPreconditions() get_recovery_partition_mock.assert_called_once() exists_mock.assert_called_once_with( '/Library/Keychains/FileVaultMaster.keychain')