@@ -65,7 +65,7 @@ def test_initialize_readonly(self, mock_build, mock_return_cred):
6565 mock_return_cred .assert_called_once_with ()
6666 mock_cred .assert_called_once_with (service_account , key ,
6767 scope = BIGQUERY_SCOPE_READ_ONLY )
68- mock_cred .authorize .assert_called_once ( )
68+ self . assertTrue ( mock_cred .return_value . authorize .called )
6969 mock_build .assert_called_once_with ('bigquery' , 'v2' , http = mock_http )
7070 self .assertEquals (mock_bq , bq_client .bigquery )
7171 self .assertEquals (project_id , bq_client .project_id )
@@ -95,7 +95,7 @@ def test_initialize_read_write(self, mock_build, mock_return_cred):
9595 mock_return_cred .assert_called_once_with ()
9696 mock_cred .assert_called_once_with (service_account , key ,
9797 scope = BIGQUERY_SCOPE )
98- mock_cred .authorize .assert_called_once ( )
98+ self . assertTrue ( mock_cred .return_value . authorize .called )
9999 mock_build .assert_called_once_with ('bigquery' , 'v2' , http = mock_http )
100100 self .assertEquals (mock_bq , bq_client .bigquery )
101101 self .assertEquals (project_id , bq_client .project_id )
@@ -130,7 +130,7 @@ def test_initialize_key_file(self, mock_open, mock_build,
130130 mock_return_cred .assert_called_once_with ()
131131 mock_cred .assert_called_once_with (service_account , key ,
132132 scope = BIGQUERY_SCOPE )
133- mock_cred .authorize .assert_called_once ( )
133+ self . assertTrue ( mock_cred .return_value . authorize .called )
134134 mock_build .assert_called_once_with ('bigquery' , 'v2' , http = mock_http )
135135 self .assertEquals (mock_bq , bq_client .bigquery )
136136 self .assertEquals (project_id , bq_client .project_id )
@@ -378,7 +378,7 @@ def test_get_response(self):
378378 projectId = self .project_id , jobId = job_id , startIndex = offset ,
379379 maxResults = limit , pageToken = page_token , timeoutMs = 1000 )
380380
381- mock_query_job .execute .assert_called_once ()
381+ mock_query_job .execute .assert_called_once_with ()
382382 self .assertEquals (actual , mock_query_reply )
383383
384384
0 commit comments