diff --git a/tests/test_api.py b/tests/test_api.py index ae3c9d6..97aa31b 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -158,7 +158,7 @@ def test_bad_requests(hub): with pytest.raises(HubError) as e: c.get("/issues", limit="abc") assert e.value.status == 400 - req =urllib.request.Request(hub["base"] + "/batches", data=b"{not json", method="POST", + req = urllib.request.Request(hub["base"] + "/batches", data=b"{not json", method="POST", headers={"Authorization": "Bearer " + c.token}) with pytest.raises(urllib.error.HTTPError) as e2: urllib.request.urlopen(req)