diff --git a/main.py b/main.py index d454829..a3a8020 100644 --- a/main.py +++ b/main.py @@ -33,6 +33,21 @@ class TestTCP(TestCase): self.sock.close() +class TestUDP(TestCase): + + def setUp(self) -> None: + self.sock = socket.socket(type=socket.SOCK_DGRAM) + + def test_nm(self) -> None: + self.sock.sendto(device.nm_req_data().encode(), UDP_ADDR) + # aaand we can not check if server accepted the data + # so this TestCase is absolutely useless + # until client API is implemented + + def test_json(self) -> None: + self.sock.sendto(device.json_req_data().encode(), UDP_ADDR) + + class TestHTTP(TestCase): def test_get(self) -> None: