File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ def test_default_port(self) -> None:
34
34
ssl_mock = Mock ()
35
35
ssl_context .wrap_socket = ssl_mock
36
36
37
- with self .assertRaises (OSError ):
37
+ with self .assertRaises (MQTT . MMQTTException ):
38
38
expected_port = port
39
39
mqtt_client .connect ()
40
40
@@ -59,7 +59,7 @@ def test_connect_override(self):
59
59
connect_retries = 1 ,
60
60
)
61
61
62
- with self .assertRaises (OSError ):
62
+ with self .assertRaises (MQTT . MMQTTException ):
63
63
expected_host = "127.0.0.2"
64
64
expected_port = 1884
65
65
self .assertNotEqual (
@@ -102,7 +102,7 @@ def test_tls_port(self) -> None:
102
102
socket_mock .connect = connect_mock
103
103
ssl_mock .wrap_socket = Mock (return_value = socket_mock )
104
104
105
- with self .assertRaises (RuntimeError ):
105
+ with self .assertRaises (MQTT . MMQTTException ):
106
106
mqtt_client .connect ()
107
107
108
108
ssl_mock .wrap_socket .assert_called ()
You can’t perform that action at this time.
0 commit comments