def METHOD_NAME(self):
    responses.add(
        responses.POST, "https://example.org/oauth/token", json={"token": "a-fake-token"}
    )
    pipeline = IdentityProviderPipeline(request=self.request, provider_key="dummy")
    code = "auth-code"
    result = self.view.exchange_token(self.request, pipeline, code)
    assert "token" in result
    assert "a-fake-token" == result["token"]
    assert len(responses.calls) == 1
    assert responses.calls[0].request.url == "https://example.org/oauth/token"
    data = dict(parse_qsl(responses.calls[0].request.body))
    assert data == {
        "client_id": "123456",
        "client_secret": "secret-value",
        "code": "auth-code",
        "grant_type": "authorization_code",
        "redirect_uri": "http://testserver/extensions/default/setup/",
    }