Refactor HTTPRequest URLs for testing

- Updates the URLs used in the `test_http_request` and `test_http_request_with_json_payload` methods of the `TestHTTPRequest` class to use a different testing endpoint for HTTP requests.
This commit is contained in:
Kumi 2023-08-31 08:58:17 +02:00
parent cbe4eb46c6
commit f53c41c99f
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -7,12 +7,12 @@ from pykeydelivery import *
class TestHTTPRequest(TestCase):
def test_http_request(self):
http = HTTPRequest("https://httpbin.org/get")
http = HTTPRequest("https://httpbin.kumi.systems/get")
response = http.execute()
self.assertEqual(response["headers"]["User-Agent"], http.USER_AGENT)
def test_http_request_with_json_payload(self):
http = HTTPRequest("https://httpbin.org/post")
http = HTTPRequest("https://httpbin.kumi.systems/post")
http.add_json_payload({"foo": "bar"})
response = http.execute()
self.assertEqual(response["headers"]["User-Agent"], http.USER_AGENT)