def METHOD_NAME(mock_request):
    post_mock = Mock(
        return_value=Mock(
            status_code=400,
        ),
    )
    with patch("requests.post", post_mock):
        with pytest.raises(exceptions.OAuth2AccessTokenResponseError):
            get_access_token(mock_request, CODE_GRANT)
        post_mock.assert_called_once()