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 15
15
from async_query import async_query
16
16
17
17
18
- def test_async_query (cloud_config , capsys ):
18
+ def test_async_query (capsys ):
19
19
query = (
20
20
'SELECT corpus FROM `publicdata.samples.shakespeare` '
21
21
'GROUP BY corpus;' )
Original file line number Diff line number Diff line change 11
11
# See the License for the specific language governing permissions and
12
12
# limitations under the License.
13
13
14
- import export_data_to_gcs
14
+ import os
15
15
16
+ import export_data_to_gcs
16
17
18
+ BUCKET = os .environ ['CLOUD_STORAGE_BUCKET' ]
17
19
DATASET_ID = 'test_dataset'
18
20
TABLE_ID = 'test_table'
19
21
20
22
21
- def test_export_data_to_gcs (cloud_config , capsys ):
23
+ def test_export_data_to_gcs (capsys ):
22
24
export_data_to_gcs .export_data_to_gcs (
23
25
DATASET_ID ,
24
26
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 ))
27
28
28
29
out , _ = capsys .readouterr ()
29
30
Original file line number Diff line number Diff line change 11
11
# See the License for the specific language governing permissions and
12
12
# limitations under the License.
13
13
14
+ import os
15
+
14
16
import load_data_from_gcs
15
17
18
+ BUCKET = os .environ ['CLOUD_STORAGE_BUCKET' ]
16
19
DATASET_ID = 'test_dataset'
17
20
TABLE_ID = 'test_import_table'
18
21
19
22
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 )
23
25
24
26
load_data_from_gcs .load_data_from_gcs (
25
27
DATASET_ID ,
Original file line number Diff line number Diff line change 15
15
import sync_query_params
16
16
17
17
18
- def test_sync_query_named_params (cloud_config , capsys ):
18
+ def test_sync_query_named_params (capsys ):
19
19
sync_query_params .sync_query_named_params (
20
20
corpus = 'romeoandjuliet' ,
21
21
min_word_count = 100 )
22
22
out , _ = capsys .readouterr ()
23
23
assert 'love' in out
24
24
25
25
26
- def test_sync_query_positional_params (cloud_config , capsys ):
26
+ def test_sync_query_positional_params (capsys ):
27
27
sync_query_params .sync_query_positional_params (
28
28
corpus = 'romeoandjuliet' ,
29
29
min_word_count = 100 )
Original file line number Diff line number Diff line change 15
15
from sync_query import sync_query
16
16
17
17
18
- def test_sync_query (cloud_config , capsys ):
18
+ def test_sync_query (capsys ):
19
19
query = (
20
20
'SELECT corpus FROM `publicdata.samples.shakespeare` '
21
21
'GROUP BY corpus;' )
You can’t perform that action at this time.
0 commit comments