Skip to content

Commit d164f82

Browse files
committed
Fix tests number 1.
1 parent 72bf55f commit d164f82

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

spanner/cloud-client/snippets_test.py

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def test_insert_data_with_timestamp(temporary_database, capsys):
206206

207207

208208
@pytest.fixture(scope='module')
209-
def temporary_database_with_timestamps(temporary_database):
209+
def temp_database_with_timestamps(temporary_database):
210210
snippets.create_table_with_timestamp(
211211
SPANNER_INSTANCE,
212212
temporary_database.database_id)
@@ -217,55 +217,52 @@ def temporary_database_with_timestamps(temporary_database):
217217
yield temporary_database
218218

219219

220-
def test_add_timestamp_column(temporary_database, capsys):
220+
def test_add_timestamp_column(temp_database_with_timestamps, capsys):
221221
snippets.add_timestamp_column(
222222
SPANNER_INSTANCE,
223-
temporary_database_with_timestamps.database_id)
223+
temp_database_with_timestamps.database_id)
224224

225225
out, _ = capsys.readouterr()
226226

227227
assert 'Albums' in out
228228

229229

230230
@pytest.fixture(scope='module')
231-
def temporary_database_with_timestamps_column(
232-
temporary_database_with_timestamps):
231+
def temp_database_with_timestamps_column(temp_database_with_timestamps):
233232
snippets.add_timestamp_column(
234233
SPANNER_INSTANCE,
235-
temporary_database_with_timestamps.database_id)
234+
temp_database_with_timestamps.database_id)
236235

237236
yield temporary_database
238237

239238

240239
def test_update_data_with_timestamp(
241-
temporary_database_with_timestamps_column, capsys):
240+
temp_database_with_timestamps_column, capsys):
242241
snippets.update_data_with_timestamp(
243242
SPANNER_INSTANCE,
244-
temporary_database_with_timestamps_column.database_id)
243+
temp_database_with_timestamps_column.database_id)
245244

246245
out, _ = capsys.readouterr()
247246

248247
assert 'Updated data.' in out
249248

250249

251250
@pytest.fixture(scope='module')
252-
def temporary_database_with_timestamps_data(
253-
temporary_database_with_timestamps):
254-
snippets.add_timestamp_column(
251+
def temp_database_with_timestamps_data(temp_database_with_timestamps_column):
252+
snippets.update_data_with_timestamp(
255253
SPANNER_INSTANCE,
256-
temporary_database_with_timestamps.database_id)
254+
temp_database_with_timestamps_column.database_id)
257255

258256
yield temporary_database
259257

260258

261259
@pytest.mark.slow
262-
def test_query_data_with_timestamp(
263-
temporary_database_with_timestamps_data, capsys):
260+
def test_query_data_with_timestamp(temp_database_with_timestamps_data, capsys):
264261
@eventually_consistent.call
265262
def _():
266263
snippets.query_data_with_timestamp(
267264
SPANNER_INSTANCE,
268-
temporary_database_with_timestamps_data.database_id)
265+
temp_database_with_timestamps_data.database_id)
269266

270267
out, _ = capsys.readouterr()
271268

0 commit comments

Comments
 (0)