File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ def test_default_port(self) -> None:
3434 ssl_mock = Mock ()
3535 ssl_context .wrap_socket = ssl_mock
3636
37- with self .assertRaises (OSError ):
37+ with self .assertRaises (MQTT . MMQTTException ):
3838 expected_port = port
3939 mqtt_client .connect ()
4040
@@ -59,7 +59,7 @@ def test_connect_override(self):
5959 connect_retries = 1 ,
6060 )
6161
62- with self .assertRaises (OSError ):
62+ with self .assertRaises (MQTT . MMQTTException ):
6363 expected_host = "127.0.0.2"
6464 expected_port = 1884
6565 self .assertNotEqual (
@@ -102,7 +102,7 @@ def test_tls_port(self) -> None:
102102 socket_mock .connect = connect_mock
103103 ssl_mock .wrap_socket = Mock (return_value = socket_mock )
104104
105- with self .assertRaises (RuntimeError ):
105+ with self .assertRaises (MQTT . MMQTTException ):
106106 mqtt_client .connect ()
107107
108108 ssl_mock .wrap_socket .assert_called ()
You can’t perform that action at this time.
0 commit comments