def test_delete_device_registry(self): channel = ChannelStub() client = iot_v1.DeviceManagerClient(channel=channel) # Setup Request name = client.registry_path('[PROJECT]', '[LOCATION]', '[REGISTRY]') client.delete_device_registry(name) assert len(channel.requests) == 1 expected_request = device_manager_pb2.DeleteDeviceRegistryRequest( name=name) actual_request = channel.requests[0][1] assert expected_request == actual_request
def test_delete_device_registry(self): channel = ChannelStub() patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = iot_v1.DeviceManagerClient() # Setup Request name = client.registry_path("[PROJECT]", "[LOCATION]", "[REGISTRY]") client.delete_device_registry(name) assert len(channel.requests) == 1 expected_request = device_manager_pb2.DeleteDeviceRegistryRequest(name=name) actual_request = channel.requests[0][1] assert expected_request == actual_request