From ab67b007174a818ad2b7a6e4bbea0b6cef7661a9 Mon Sep 17 00:00:00 2001 From: DarkCat09 Date: Fri, 23 Aug 2024 20:50:37 +0400 Subject: [PATCH] [old local changes] add content-type --- main.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/main.py b/main.py index a61706d..d053ed3 100644 --- a/main.py +++ b/main.py @@ -16,6 +16,7 @@ HTTP_URL = 'http://127.0.0.1:8080' class TestTCP(TestCase): def setUp(self) -> None: + self.skipTest('Not implemented yet') self.sock = socket.socket() self.sock.connect(TCP_ADDR) @@ -38,6 +39,7 @@ class TestTCP(TestCase): class TestUDP(TestCase): def setUp(self) -> None: + self.skipTest('Useless until no client API') self.sock = socket.socket(type=socket.SOCK_DGRAM) def test_nm(self) -> None: @@ -69,13 +71,20 @@ class TestHTTP(TestCase): 'POST', HTTP_URL + '/post', body=device.http_req_data(), + headers={ + 'Content-Type': 'application/x-www-form-urlencoded', + }, )) def test_json(self) -> None: + self.skipTest('Not implemented yet') self._check_status(self.http.request( 'POST', HTTP_URL + '/json', body=device.json_req_data(), + headers={ + 'Content-Type': 'application/json', + }, )) def _check_status(self, resp: urllib3.HTTPResponse) -> None: