Skip to content

Commit 234deef

Browse files
Copilotmykaul
authored andcommitted
Apply Python style improvements to test assertions
Co-authored-by: mykaul <[email protected]>
1 parent 5dd0640 commit 234deef

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/integration/standard/test_control_connection.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@ def test_get_control_connection_host(self):
9090
"""
9191

9292
host = self.cluster.get_control_connection_host()
93-
assert host == None
93+
assert host is None
9494

9595
self.session = self.cluster.connect()
9696
cc_host = self.cluster.control_connection._connection.host
9797

9898
host = self.cluster.get_control_connection_host()
9999
assert host.address == cc_host
100-
assert host.is_up == True
100+
assert host.is_up
101101

102102
# reconnect and make sure that the new host is reflected correctly
103103
self.cluster.control_connection._reconnect()
@@ -117,16 +117,16 @@ def test_control_connection_port_discovery(self):
117117
self.cluster = TestCluster()
118118

119119
host = self.cluster.get_control_connection_host()
120-
assert host == None
120+
assert host is None
121121

122122
self.session = self.cluster.connect()
123123
cc_endpoint = self.cluster.control_connection._connection.endpoint
124124

125125
host = self.cluster.get_control_connection_host()
126126
assert host.endpoint == cc_endpoint
127-
assert host.is_up == True
127+
assert host.is_up
128128
hosts = self.cluster.metadata.all_hosts()
129-
assert 3 == len(hosts)
129+
assert len(hosts) == 3
130130

131131
for host in hosts:
132132
assert 9042 == host.broadcast_rpc_port

0 commit comments

Comments
 (0)