def BeyondCorp(self) -> bool: """Cache whether the image is running Beyond Corp. Returns: True or False bool returned from beyondcorp lib. """ self._beyondcorp = beyondcorp.BeyondCorp() return self._beyondcorp.CheckBeyondCorp()
def setUp(self): super(BeyondcorpTest, self).setUp() self.__saved_flags = flagsaver.save_flag_values() mock_wmi = mock.patch.object( beyondcorp.wmi_query, 'WMIQuery', autospec=True) self.addCleanup(mock_wmi.stop) self.mock_wmi = mock_wmi.start() self.filesystem = fake_filesystem.FakeFilesystem() self.filesystem.create_file(r'C:\seed.json', contents=_TEST_SEED) self.filesystem.create_file(_TEST_WIM_PATH, contents=_TEST_WIM) beyondcorp.os = fake_filesystem.FakeOsModule(self.filesystem) beyondcorp.open = fake_filesystem.FakeFileOpen(self.filesystem) self.beyondcorp = beyondcorp.BeyondCorp()
def __init__(self, show_progress: bool = False): self._debug_info = {} self._save_location = None self._default_show_progress = show_progress self._ca_cert_file = None self._beyondcorp = beyondcorp.BeyondCorp()