@@ -52,17 +52,17 @@ def _makeHTTP(self, *args, **kw):
52
52
def test_ctor_default (self , _ ):
53
53
CREDENTIALS = _make_credentials ()
54
54
target = self ._make_one (credentials = CREDENTIALS )
55
- self .assertEquals (target .service , target .DEFAULT_SERVICE )
56
- self .assertEquals (target .version , None )
55
+ self .assertEqual (target .service , target .DEFAULT_SERVICE )
56
+ self .assertEqual (target .version , None )
57
57
58
58
def test_ctor_params (self ):
59
59
CREDENTIALS = _make_credentials ()
60
60
target = self ._make_one (project = self .PROJECT ,
61
61
credentials = CREDENTIALS ,
62
62
service = self .SERVICE ,
63
63
version = self .VERSION )
64
- self .assertEquals (target .service , self .SERVICE )
65
- self .assertEquals (target .version , self .VERSION )
64
+ self .assertEqual (target .service , self .SERVICE )
65
+ self .assertEqual (target .version , self .VERSION )
66
66
67
67
def test_report_exception_with_gax (self ):
68
68
CREDENTIALS = _make_credentials ()
@@ -77,7 +77,7 @@ def test_report_exception_with_gax(self):
77
77
except NameError :
78
78
target .report_exception ()
79
79
payload = make_api .return_value .report_error_event .call_args [0 ][0 ]
80
- self .assertEquals (payload ['serviceContext' ], {
80
+ self .assertEqual (payload ['serviceContext' ], {
81
81
'service' : target .DEFAULT_SERVICE ,
82
82
})
83
83
self .assertIn ('test_report' , payload ['message' ])
@@ -99,7 +99,7 @@ def test_report_exception_wo_gax(self):
99
99
mock_report = _error_api .return_value .report_error_event
100
100
payload = mock_report .call_args [0 ][0 ]
101
101
102
- self .assertEquals (payload ['serviceContext' ], {
102
+ self .assertEqual (payload ['serviceContext' ], {
103
103
'service' : target .DEFAULT_SERVICE ,
104
104
})
105
105
self .assertIn ('test_report' , payload ['message' ])
@@ -129,19 +129,19 @@ def test_report_exception_with_service_version_in_constructor(
129
129
target .report_exception (http_context = http_context , user = USER )
130
130
131
131
payload = client .report_error_event .call_args [0 ][0 ]
132
- self .assertEquals (payload ['serviceContext' ], {
132
+ self .assertEqual (payload ['serviceContext' ], {
133
133
'service' : SERVICE ,
134
134
'version' : VERSION
135
135
})
136
136
self .assertIn (
137
137
'test_report_exception_with_service_version_in_constructor' ,
138
138
payload ['message' ])
139
139
self .assertIn ('test_client.py' , payload ['message' ])
140
- self .assertEquals (
140
+ self .assertEqual (
141
141
payload ['context' ]['httpContext' ]['responseStatusCode' ], 500 )
142
- self .assertEquals (
142
+ self .assertEqual (
143
143
payload ['context' ]['httpContext' ]['method' ], 'GET' )
144
- self .assertEquals (payload ['context' ]['user' ], USER )
144
+ self .assertEqual (payload ['context' ]['user' ], USER )
145
145
146
146
@mock .patch ('google.cloud.error_reporting.client.make_report_error_api' )
147
147
def test_report (self , make_client ):
@@ -157,7 +157,7 @@ def test_report(self, make_client):
157
157
158
158
payload = client .report_error_event .call_args [0 ][0 ]
159
159
160
- self .assertEquals (payload ['message' ], MESSAGE )
160
+ self .assertEqual (payload ['message' ], MESSAGE )
161
161
report_location = payload ['context' ]['reportLocation' ]
162
162
self .assertIn ('test_client.py' , report_location ['filePath' ])
163
163
self .assertEqual (report_location ['functionName' ], 'test_report' )
0 commit comments