コード例 #1
0
def test_read_stale_data(temporary_database, capsys):
    snippets.read_stale_data(SPANNER_INSTANCE, temporary_database.database_id)

    out, _ = capsys.readouterr()

    # It shouldn't be in the output because it was *just* inserted by the
    # temporary database fixture and this sample reads 10 seconds into the
    # past.
    assert 'Total Junk' not in out
コード例 #2
0
def test_read_stale_data(temporary_database, capsys):
    snippets.read_stale_data(SPANNER_INSTANCE, temporary_database.database_id)

    out, _ = capsys.readouterr()

    # It shouldn't be in the output because it was *just* inserted by the
    # temporary database fixture and this sample reads 10 seconds into the
    # past.
    assert 'Total Junk' not in out
コード例 #3
0
ファイル: snippets_test.py プロジェクト: othercamb/GCP
def test_read_stale_data(capsys):
    # This snippet relies on test_update_data inserting data
    # at least 15 seconds after the previous insert
    snippets.read_stale_data(INSTANCE_ID, DATABASE_ID)
    out, _ = capsys.readouterr()
    assert 'SingerId: 1, AlbumId: 1, MarketingBudget: None' in out
コード例 #4
0
def test_read_stale_data(capsys, instance_id, sample_database):
    # This snippet relies on test_update_data inserting data
    # at least 15 seconds after the previous insert
    snippets.read_stale_data(instance_id, sample_database.database_id)
    out, _ = capsys.readouterr()
    assert "SingerId: 1, AlbumId: 1, MarketingBudget: None" in out
コード例 #5
0
def test_read_stale_data(capsys):
    # This snippet relies on test_update_data inserting data
    # at least 15 seconds after the previous insert
    snippets.read_stale_data(INSTANCE_ID, DATABASE_ID)
    out, _ = capsys.readouterr()
    assert 'SingerId: 1, AlbumId: 1, MarketingBudget: None' in out