---
sidebar:
  hidden: true
title: roboto.testing
---
Test doubles that stand in for Roboto in unit tests of code that uses the SDK.

To test code that calls SDK methods, use [`StubRobotoClient`](/docs/reference/python-sdk/roboto/testing#roboto.testing.StubRobotoClient); to test code that calls an [`HttpClient`](/docs/reference/python-sdk/roboto/http#roboto.http.HttpClient) directly, use [`FakeHttpResponseFactory`](/docs/reference/python-sdk/roboto/testing#roboto.testing.FakeHttpResponseFactory). Pass a `StubRobotoClient` as the `roboto_client` of those methods: it returns the responses you register for the requests you expect, and raises `AssertionError` on any other request. A `FakeHttpResponseFactory` builds the responses a mock of that client returns.

## Submodules

- [roboto.testing.fake_http_response_factory](/docs/reference/python-sdk/roboto/testing/fake_http_response_factory)
- [roboto.testing.stub_roboto_client](/docs/reference/python-sdk/roboto/testing/stub_roboto_client)

## Package Contents

- [FakeHttpResponseFactory](/docs/reference/python-sdk/roboto/testing/fake_http_response_factory#roboto.testing.fake_http_response_factory.FakeHttpResponseFactory) (class): Builder of fake HTTP responses, for tests that mock [`HttpClient`](/docs/reference/python-sdk/roboto/http/http_client#roboto.http.http_client.HttpClient).

- [StubRobotoClient](/docs/reference/python-sdk/roboto/testing/stub_roboto_client#roboto.testing.stub_roboto_client.StubRobotoClient) (class): Client that answers SDK requests with responses a test registers, in place of Roboto.
