Skip to content

Commit

Permalink
Fix tests number 1.
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtisvg committed Mar 27, 2018
1 parent 72bf55f commit ea5c8ec
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions spanner/cloud-client/snippets_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,44 +228,41 @@ def test_add_timestamp_column(temporary_database, capsys):


@pytest.fixture(scope='module')
def temporary_database_with_timestamps_column(
temporary_database_with_timestamps):
def temp_database_with_timestamps_column(temp_database_with_timestamps):
snippets.add_timestamp_column(
SPANNER_INSTANCE,
temporary_database_with_timestamps.database_id)
temp_database_with_timestamps.database_id)

yield temporary_database


def test_update_data_with_timestamp(
temporary_database_with_timestamps_column, capsys):
temp_database_with_timestamps_column, capsys):
snippets.update_data_with_timestamp(
SPANNER_INSTANCE,
temporary_database_with_timestamps_column.database_id)
temp_database_with_timestamps_column.database_id)

out, _ = capsys.readouterr()

assert 'Updated data.' in out


@pytest.fixture(scope='module')
def temporary_database_with_timestamps_data(
temporary_database_with_timestamps):
def temp_database_with_timestamps_data(temp_database_with_timestamps_column):
snippets.add_timestamp_column(
SPANNER_INSTANCE,
temporary_database_with_timestamps.database_id)
temp_database_with_timestamps_column.database_id)

yield temporary_database


@pytest.mark.slow
def test_query_data_with_timestamp(
temporary_database_with_timestamps_data, capsys):
def test_query_data_with_timestamp(temp_database_with_timestamps_data, capsys):
@eventually_consistent.call
def _():
snippets.query_data_with_timestamp(
SPANNER_INSTANCE,
temporary_database_with_timestamps_data.database_id)
temp_database_with_timestamps_data.database_id)

out, _ = capsys.readouterr()

Expand Down

0 comments on commit ea5c8ec

Please sign in to comment.