File tree Expand file tree Collapse file tree
tests/integration/standard Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -192,13 +192,23 @@ def test_session_host_parameter(self):
192192
193193 @test_category connection
194194 """
195+ # Test with empty list
196+ cluster = Cluster (protocol_version = PROTOCOL_VERSION )
195197 with self .assertRaises (NoHostAvailable ):
196- Session (Cluster (protocol_version = PROTOCOL_VERSION ), [])
198+ Session (cluster , [])
199+ cluster .shutdown ()
200+
201+ # Test with only invalid
202+ cluster = Cluster (protocol_version = PROTOCOL_VERSION )
197203 with self .assertRaises (NoHostAvailable ):
198- Session (Cluster (protocol_version = PROTOCOL_VERSION ), [Host ("1.2.3.4" , SimpleConvictionPolicy )])
199- session = Session (Cluster (protocol_version = PROTOCOL_VERSION ), [Host (x , SimpleConvictionPolicy ) for x in
204+ Session (cluster , [Host ("1.2.3.4" , SimpleConvictionPolicy )])
205+ cluster .shutdown ()
206+
207+ # Test with valid and invalid hosts
208+ cluster = Cluster (protocol_version = PROTOCOL_VERSION )
209+ Session (cluster , [Host (x , SimpleConvictionPolicy ) for x in
200210 ("127.0.0.1" , "127.0.0.2" , "1.2.3.4" )])
201- session .shutdown ()
211+ cluster .shutdown ()
202212
203213 def test_protocol_negotiation (self ):
204214 """
You can’t perform that action at this time.
0 commit comments