Beispiel #1
0
 def test_get_agent_state_calls_get_with_uri_and_params(
         self, mock_connection, successful_response):
     mock_connection.get.return_value = successful_response
     service = DeviceService(mock_connection)
     service.get_agent_state("DEVICE_ID", property_name="KEY")
     expected_params = {"deviceGuid": "DEVICE_ID", "propertyName": "KEY"}
     uri = u"/api/v14/agent-state/view-by-device-guid"
     mock_connection.get.assert_called_once_with(uri,
                                                 params=expected_params)
Beispiel #2
0
 def test_get_agent_full_disk_access_state_calls_get_agent_state_with_arguments(
         self, mock_connection, successful_response, mocker):
     mock_connection.get.return_value = successful_response
     service = DeviceService(mock_connection)
     service.get_agent_state = mocker.Mock()
     service.get_agent_full_disk_access_state("DEVICE_ID")
     service.get_agent_state.assert_called_once_with(
         "DEVICE_ID", "fullDiskAccess")