File tree Expand file tree Collapse file tree 5 files changed +14
-11
lines changed Expand file tree Collapse file tree 5 files changed +14
-11
lines changed Original file line number Diff line number Diff line change 1515from async_query import async_query
1616
1717
18- def test_async_query (cloud_config , capsys ):
18+ def test_async_query (capsys ):
1919 query = (
2020 'SELECT corpus FROM `publicdata.samples.shakespeare` '
2121 'GROUP BY corpus;' )
Original file line number Diff line number Diff line change 1111# See the License for the specific language governing permissions and
1212# limitations under the License.
1313
14- import export_data_to_gcs
14+ import os
1515
16+ import export_data_to_gcs
1617
18+ BUCKET = os .environ ['CLOUD_STORAGE_BUCKET' ]
1719DATASET_ID = 'test_dataset'
1820TABLE_ID = 'test_table'
1921
2022
21- def test_export_data_to_gcs (cloud_config , capsys ):
23+ def test_export_data_to_gcs (capsys ):
2224 export_data_to_gcs .export_data_to_gcs (
2325 DATASET_ID ,
2426 TABLE_ID ,
25- 'gs://{}/test-export-data-to-gcs.csv' .format (
26- cloud_config .storage_bucket ))
27+ 'gs://{}/test-export-data-to-gcs.csv' .format (BUCKET ))
2728
2829 out , _ = capsys .readouterr ()
2930
Original file line number Diff line number Diff line change 1111# See the License for the specific language governing permissions and
1212# limitations under the License.
1313
14+ import os
15+
1416import load_data_from_gcs
1517
18+ BUCKET = os .environ ['CLOUD_STORAGE_BUCKET' ]
1619DATASET_ID = 'test_dataset'
1720TABLE_ID = 'test_import_table'
1821
1922
20- def test_load_table (cloud_config , capsys ):
21- cloud_storage_input_uri = 'gs://{}/data.csv' .format (
22- cloud_config .storage_bucket )
23+ def test_load_table (capsys ):
24+ cloud_storage_input_uri = 'gs://{}/data.csv' .format (BUCKET )
2325
2426 load_data_from_gcs .load_data_from_gcs (
2527 DATASET_ID ,
Original file line number Diff line number Diff line change 1515import sync_query_params
1616
1717
18- def test_sync_query_named_params (cloud_config , capsys ):
18+ def test_sync_query_named_params (capsys ):
1919 sync_query_params .sync_query_named_params (
2020 corpus = 'romeoandjuliet' ,
2121 min_word_count = 100 )
2222 out , _ = capsys .readouterr ()
2323 assert 'love' in out
2424
2525
26- def test_sync_query_positional_params (cloud_config , capsys ):
26+ def test_sync_query_positional_params (capsys ):
2727 sync_query_params .sync_query_positional_params (
2828 corpus = 'romeoandjuliet' ,
2929 min_word_count = 100 )
Original file line number Diff line number Diff line change 1515from sync_query import sync_query
1616
1717
18- def test_sync_query (cloud_config , capsys ):
18+ def test_sync_query (capsys ):
1919 query = (
2020 'SELECT corpus FROM `publicdata.samples.shakespeare` '
2121 'GROUP BY corpus;' )
You can’t perform that action at this time.
0 commit comments