Skip to content

Commit eb22abb

Browse files
michaelawyuJon Wayne Parrott
michaelawyu
authored and
Jon Wayne Parrott
committed
Fixed failed tests on Kokoro (Spanner + Translate) (#1192)
* Fixed failed tests on Kokoro (Spanner + Translate) * Update quickstart_test.py
1 parent ea085c9 commit eb22abb

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

spanner/cloud-client/quickstart_test.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
import os
1616

1717
from google.cloud import spanner
18-
import google.cloud.exceptions
19-
import google.cloud.spanner.client
2018
import mock
2119
import pytest
2220

@@ -27,13 +25,13 @@
2725

2826
@pytest.fixture
2927
def patch_instance():
30-
original_instance = google.cloud.spanner.client.Client.instance
28+
original_instance = spanner.Client.instance
3129

3230
def new_instance(self, unused_instance_name):
3331
return original_instance(self, SPANNER_INSTANCE)
3432

3533
instance_patch = mock.patch(
36-
'google.cloud.spanner.client.Client.instance',
34+
'google.cloud.spanner.Client.instance',
3735
side_effect=new_instance,
3836
autospec=True)
3937

spanner/cloud-client/snippets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def query_data_with_index(
194194
ALTER TABLE Albums ADD COLUMN MarketingBudget INT64
195195
196196
"""
197-
from google.cloud.proto.spanner.v1 import type_pb2
197+
from google.cloud.spanner_v1.proto import type_pb2
198198

199199
spanner_client = spanner.Client()
200200
instance = spanner_client.instance(instance_id)

translate/cloud-client/snippets_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ def test_translate_utf8(capsys):
4646
text = u'나는 파인애플을 좋아한다.'
4747
snippets.translate_text('en', text)
4848
out, _ = capsys.readouterr()
49-
assert u'I like pineapple.' in out
49+
assert u'I like pineapples.' in out

0 commit comments

Comments
 (0)