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
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
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
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
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