def testWithClientSet(self): mock_client = mock.MagicMock() with mock.patch.object(magics_impl._state, 'client', mock_client): magics_impl.grr_interrogate_impl() mock_client.interrogate.assert_called_once_with()
def grr_interrogate(line: Text) -> pd.DataFrame: """Creates Interrogate flow for the chosen client. Args: line: A string representing arguments passed to the magic command. Returns: Client summary including system and client info, interfaces, and users. Raises: NoClientSelectedError: Client is not selected to perform this operation. """ del line # Unused. return magics_impl.grr_interrogate_impl()
def testNoClientSelected(self): with self.assertRaises(magics_impl.NoClientSelectedError): magics_impl.grr_interrogate_impl()