|
15 | 15 |
|
16 | 16 |
|
17 | 17 | @patch("google.cloud.speech.SpeechClient") |
18 | | -def test_transcribe_with_google_cloud_speech(SpeechClient, monkeypatch): |
19 | | - monkeypatch.setenv( |
20 | | - "GOOGLE_APPLICATION_CREDENTIALS", "path/to/credentials.json" |
21 | | - ) |
22 | | - |
| 18 | +def test_transcribe_with_google_cloud_speech(SpeechClient): |
23 | 19 | client = SpeechClient.return_value |
24 | 20 | # ref: https://cloud.google.com/speech-to-text/docs/transcribe-gcloud?hl=ja#make_an_audio_transcription_request |
25 | 21 | client.recognize.return_value = RecognizeResponse( |
@@ -84,11 +80,7 @@ def test_transcribe_with_specified_credentials(SpeechClient): |
84 | 80 |
|
85 | 81 |
|
86 | 82 | @patch("google.cloud.speech.SpeechClient") |
87 | | -def test_transcribe_show_all(SpeechClient, monkeypatch): |
88 | | - monkeypatch.setenv( |
89 | | - "GOOGLE_APPLICATION_CREDENTIALS", "path/to/credentials.json" |
90 | | - ) |
91 | | - |
| 83 | +def test_transcribe_show_all(SpeechClient): |
92 | 84 | client = SpeechClient.return_value |
93 | 85 | client.recognize.return_value = RecognizeResponse( |
94 | 86 | results=[ |
@@ -151,11 +143,7 @@ def test_transcribe_show_all(SpeechClient, monkeypatch): |
151 | 143 |
|
152 | 144 |
|
153 | 145 | @patch("google.cloud.speech.SpeechClient") |
154 | | -def test_transcribe_with_specified_api_parameters(SpeechClient, monkeypatch): |
155 | | - monkeypatch.setenv( |
156 | | - "GOOGLE_APPLICATION_CREDENTIALS", "path/to/credentials.json" |
157 | | - ) |
158 | | - |
| 146 | +def test_transcribe_with_specified_api_parameters(SpeechClient): |
159 | 147 | client = SpeechClient.return_value |
160 | 148 | client.recognize.return_value = RecognizeResponse( |
161 | 149 | results=[ |
|
0 commit comments