@@ -421,7 +421,6 @@ def test_modification_during_generation(self):
421421 policy .on_up (hosts [2 ])
422422 policy .on_up (hosts [3 ])
423423
424-
425424 another_host = Host (5 , SimpleConvictionPolicy )
426425 another_host .set_location_info ("dc3" , "rack1" )
427426 new_host .set_location_info ("dc3" , "rack1" )
@@ -755,7 +754,7 @@ def test_no_shuffle_if_given_no_keyspace(self):
755754 @test_category policy
756755 """
757756 self ._assert_shuffle (keyspace = None , routing_key = 'routing_key' )
758-
757+
759758 def test_no_shuffle_if_given_no_routing_key (self ):
760759 """
761760 Test to validate the hosts are not shuffled when no routing_key is provided
@@ -766,7 +765,7 @@ def test_no_shuffle_if_given_no_routing_key(self):
766765 @test_category policy
767766 """
768767 self ._assert_shuffle (keyspace = 'keyspace' , routing_key = None )
769-
768+
770769 @patch ('cassandra.policies.shuffle' )
771770 def _assert_shuffle (self , patched_shuffle , keyspace , routing_key ):
772771 hosts = [Host (str (i ), SimpleConvictionPolicy ) for i in range (4 )]
@@ -884,7 +883,7 @@ def test_bad_vals(self):
884883 self .assertRaises (ValueError , ExponentialReconnectionPolicy , - 1 , 0 )
885884 self .assertRaises (ValueError , ExponentialReconnectionPolicy , 0 , - 1 )
886885 self .assertRaises (ValueError , ExponentialReconnectionPolicy , 9000 , 1 )
887- self .assertRaises (ValueError , ExponentialReconnectionPolicy , 1 , 2 ,- 1 )
886+ self .assertRaises (ValueError , ExponentialReconnectionPolicy , 1 , 2 , - 1 )
888887
889888 def test_schedule_no_max (self ):
890889 base_delay = 2.0
@@ -1235,8 +1234,7 @@ def test_hosts_with_hostname(self):
12351234class AddressTranslatorTest (unittest .TestCase ):
12361235
12371236 def test_identity_translator (self ):
1238- it = IdentityTranslator ()
1239- addr = '127.0.0.1'
1237+ IdentityTranslator ()
12401238
12411239 @patch ('socket.getfqdn' , return_value = 'localhost' )
12421240 def test_ec2_multi_region_translator (self , * _ ):
0 commit comments