Skip to content

Commit ad6cc84

Browse files
chore: use gapic-generator-python 1.0.0 (#522)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 451250442 Source-Link: googleapis/googleapis@cca5e81 Source-Link: googleapis/googleapis-gen@0b219da Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMGIyMTlkYTE2MWE4YmRjYzNjNmY3YjJlZmNkODIxMDUxODJhMzBjYSJ9
1 parent 21338af commit ad6cc84

32 files changed

+224
-32
lines changed

packages/google-cloud-dialogflow/tests/unit/gapic/dialogflow_v2/test_agents.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@
1414
# limitations under the License.
1515
#
1616
import os
17-
import mock
17+
18+
# try/except added for compatibility with python < 3.8
19+
try:
20+
from unittest import mock
21+
from unittest.mock import AsyncMock
22+
except ImportError:
23+
import mock
1824

1925
import grpc
2026
from grpc.experimental import aio

packages/google-cloud-dialogflow/tests/unit/gapic/dialogflow_v2/test_answer_records.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@
1414
# limitations under the License.
1515
#
1616
import os
17-
import mock
17+
18+
# try/except added for compatibility with python < 3.8
19+
try:
20+
from unittest import mock
21+
from unittest.mock import AsyncMock
22+
except ImportError:
23+
import mock
1824

1925
import grpc
2026
from grpc.experimental import aio

packages/google-cloud-dialogflow/tests/unit/gapic/dialogflow_v2/test_contexts.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@
1414
# limitations under the License.
1515
#
1616
import os
17-
import mock
17+
18+
# try/except added for compatibility with python < 3.8
19+
try:
20+
from unittest import mock
21+
from unittest.mock import AsyncMock
22+
except ImportError:
23+
import mock
1824

1925
import grpc
2026
from grpc.experimental import aio

packages/google-cloud-dialogflow/tests/unit/gapic/dialogflow_v2/test_conversation_datasets.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@
1414
# limitations under the License.
1515
#
1616
import os
17-
import mock
17+
18+
# try/except added for compatibility with python < 3.8
19+
try:
20+
from unittest import mock
21+
from unittest.mock import AsyncMock
22+
except ImportError:
23+
import mock
1824

1925
import grpc
2026
from grpc.experimental import aio

packages/google-cloud-dialogflow/tests/unit/gapic/dialogflow_v2/test_conversation_models.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@
1414
# limitations under the License.
1515
#
1616
import os
17-
import mock
17+
18+
# try/except added for compatibility with python < 3.8
19+
try:
20+
from unittest import mock
21+
from unittest.mock import AsyncMock
22+
except ImportError:
23+
import mock
1824

1925
import grpc
2026
from grpc.experimental import aio

packages/google-cloud-dialogflow/tests/unit/gapic/dialogflow_v2/test_conversation_profiles.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@
1414
# limitations under the License.
1515
#
1616
import os
17-
import mock
17+
18+
# try/except added for compatibility with python < 3.8
19+
try:
20+
from unittest import mock
21+
from unittest.mock import AsyncMock
22+
except ImportError:
23+
import mock
1824

1925
import grpc
2026
from grpc.experimental import aio

packages/google-cloud-dialogflow/tests/unit/gapic/dialogflow_v2/test_conversations.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@
1414
# limitations under the License.
1515
#
1616
import os
17-
import mock
17+
18+
# try/except added for compatibility with python < 3.8
19+
try:
20+
from unittest import mock
21+
from unittest.mock import AsyncMock
22+
except ImportError:
23+
import mock
1824

1925
import grpc
2026
from grpc.experimental import aio

packages/google-cloud-dialogflow/tests/unit/gapic/dialogflow_v2/test_documents.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@
1414
# limitations under the License.
1515
#
1616
import os
17-
import mock
17+
18+
# try/except added for compatibility with python < 3.8
19+
try:
20+
from unittest import mock
21+
from unittest.mock import AsyncMock
22+
except ImportError:
23+
import mock
1824

1925
import grpc
2026
from grpc.experimental import aio

packages/google-cloud-dialogflow/tests/unit/gapic/dialogflow_v2/test_entity_types.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@
1414
# limitations under the License.
1515
#
1616
import os
17-
import mock
17+
18+
# try/except added for compatibility with python < 3.8
19+
try:
20+
from unittest import mock
21+
from unittest.mock import AsyncMock
22+
except ImportError:
23+
import mock
1824

1925
import grpc
2026
from grpc.experimental import aio

packages/google-cloud-dialogflow/tests/unit/gapic/dialogflow_v2/test_environments.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@
1414
# limitations under the License.
1515
#
1616
import os
17-
import mock
17+
18+
# try/except added for compatibility with python < 3.8
19+
try:
20+
from unittest import mock
21+
from unittest.mock import AsyncMock
22+
except ImportError:
23+
import mock
1824

1925
import grpc
2026
from grpc.experimental import aio

0 commit comments

Comments
 (0)