@@ -868,7 +868,7 @@ def test(self):
868868
869869
870870class Test_retry (unittest .TestCase ):
871- class test_class :
871+ class MockClass :
872872 def test_fxn (self ):
873873 return True
874874
@@ -877,7 +877,7 @@ def test_retry_on_error(self):
877877 from google .cloud .spanner_v1 ._helpers import _retry
878878 import functools
879879
880- test_api = mock .create_autospec (self .test_class )
880+ test_api = mock .create_autospec (self .MockClass )
881881 test_api .test_fxn .side_effect = [
882882 InternalServerError ("testing" ),
883883 NotFound ("testing" ),
@@ -893,7 +893,7 @@ def test_retry_allowed_exceptions(self):
893893 from google .cloud .spanner_v1 ._helpers import _retry
894894 import functools
895895
896- test_api = mock .create_autospec (self .test_class )
896+ test_api = mock .create_autospec (self .MockClass )
897897 test_api .test_fxn .side_effect = [
898898 NotFound ("testing" ),
899899 InternalServerError ("testing" ),
@@ -914,7 +914,7 @@ def test_retry_count(self):
914914 from google .cloud .spanner_v1 ._helpers import _retry
915915 import functools
916916
917- test_api = mock .create_autospec (self .test_class )
917+ test_api = mock .create_autospec (self .MockClass )
918918 test_api .test_fxn .side_effect = [
919919 InternalServerError ("testing" ),
920920 InternalServerError ("testing" ),
@@ -930,7 +930,7 @@ def test_check_rst_stream_error(self):
930930 from google .cloud .spanner_v1 ._helpers import _retry , _check_rst_stream_error
931931 import functools
932932
933- test_api = mock .create_autospec (self .test_class )
933+ test_api = mock .create_autospec (self .MockClass )
934934 test_api .test_fxn .side_effect = [
935935 InternalServerError ("Received unexpected EOS on DATA frame from server" ),
936936 InternalServerError ("RST_STREAM" ),
@@ -951,7 +951,7 @@ def test_retry_on_aborted_exception_with_success_after_first_aborted_retry(self)
951951 from google .cloud .spanner_v1 ._helpers import _retry_on_aborted_exception
952952 import functools
953953
954- test_api = mock .create_autospec (self .test_class )
954+ test_api = mock .create_autospec (self .MockClass )
955955 test_api .test_fxn .side_effect = [
956956 Aborted ("aborted exception" , errors = ("Aborted error" )),
957957 "true" ,
@@ -970,7 +970,7 @@ def test_retry_on_aborted_exception_with_success_after_three_retries(self):
970970 from google .cloud .spanner_v1 ._helpers import _retry_on_aborted_exception
971971 import functools
972972
973- test_api = mock .create_autospec (self .test_class )
973+ test_api = mock .create_autospec (self .MockClass )
974974 # Case where aborted exception is thrown after other generic exceptions
975975 aborted = Aborted ("aborted exception" , errors = ["Aborted error" ])
976976 test_api .test_fxn .side_effect = [
@@ -994,7 +994,7 @@ def test_retry_on_aborted_exception_raises_aborted_if_deadline_expires(self):
994994 from google .cloud .spanner_v1 ._helpers import _retry_on_aborted_exception
995995 import functools
996996
997- test_api = mock .create_autospec (self .test_class )
997+ test_api = mock .create_autospec (self .MockClass )
998998 test_api .test_fxn .side_effect = [
999999 Aborted ("aborted exception" , errors = ("Aborted error" )),
10001000 "true" ,
0 commit comments