@@ -41,9 +41,7 @@ def test_default_port(self) -> None:
41
41
ssl_mock .assert_not_called ()
42
42
connect_mock .assert_called ()
43
43
# Assuming the repeated calls will have the same arguments.
44
- connect_mock .assert_has_calls (
45
- [call ((host , expected_port ))]
46
- )
44
+ connect_mock .assert_has_calls ([call ((host , expected_port ))])
47
45
48
46
def test_connect_override (self ):
49
47
"""Test that connect() can override host and port."""
@@ -62,19 +60,13 @@ def test_connect_override(self):
62
60
with self .assertRaises (MQTT .MMQTTException ):
63
61
expected_host = "127.0.0.2"
64
62
expected_port = 1884
65
- self .assertNotEqual (
66
- expected_port , port , "port override should differ"
67
- )
68
- self .assertNotEqual (
69
- expected_host , host , "host override should differ"
70
- )
63
+ self .assertNotEqual (expected_port , port , "port override should differ" )
64
+ self .assertNotEqual (expected_host , host , "host override should differ" )
71
65
mqtt_client .connect (host = expected_host , port = expected_port )
72
66
73
67
connect_mock .assert_called ()
74
68
# Assuming the repeated calls will have the same arguments.
75
- connect_mock .assert_has_calls (
76
- [call ((expected_host , expected_port ))]
77
- )
69
+ connect_mock .assert_has_calls ([call ((expected_host , expected_port ))])
78
70
79
71
def test_tls_port (self ) -> None :
80
72
"""verify that when is_ssl=True is set, the default port is 8883
0 commit comments