def test_raises_on_401(self, api_token, api_responses):
        url = "https://foo.com/"
        api_responses.add(responses.POST, url, status=401, body="nope")
        with pytest.raises(AuthenticationError) as e:
            call_api(url, "post")
        assert str(e.value) == "Authentication error 401 calling API: nope"