@@ -1167,15 +1167,15 @@ def test_update_table_delete_property(self):
11671167 self .assertEqual (req [1 ]['data' ], sent )
11681168 self .assertIsNone (table3 .description )
11691169
1170- def test_list_dataset_tables_empty (self ):
1170+ def test_list_tables_empty (self ):
11711171 path = '/projects/{}/datasets/{}/tables' .format (
11721172 self .PROJECT , self .DS_ID )
11731173 creds = _make_credentials ()
11741174 client = self ._make_one (project = self .PROJECT , credentials = creds )
11751175 conn = client ._connection = _make_connection ({})
11761176
11771177 dataset = client .dataset (self .DS_ID )
1178- iterator = client .list_dataset_tables (dataset )
1178+ iterator = client .list_tables (dataset )
11791179 self .assertIs (iterator .dataset , dataset )
11801180 page = six .next (iterator .pages )
11811181 tables = list (page )
@@ -1186,7 +1186,7 @@ def test_list_dataset_tables_empty(self):
11861186 conn .api_request .assert_called_once_with (
11871187 method = 'GET' , path = path , query_params = {})
11881188
1189- def test_list_dataset_tables_defaults (self ):
1189+ def test_list_tables_defaults (self ):
11901190 from google .cloud .bigquery .table import TableListItem
11911191
11921192 TABLE_1 = 'table_one'
@@ -1216,7 +1216,7 @@ def test_list_dataset_tables_defaults(self):
12161216 conn = client ._connection = _make_connection (DATA )
12171217 dataset = client .dataset (self .DS_ID )
12181218
1219- iterator = client .list_dataset_tables (dataset )
1219+ iterator = client .list_tables (dataset )
12201220 self .assertIs (iterator .dataset , dataset )
12211221 page = six .next (iterator .pages )
12221222 tables = list (page )
@@ -1232,7 +1232,7 @@ def test_list_dataset_tables_defaults(self):
12321232 conn .api_request .assert_called_once_with (
12331233 method = 'GET' , path = '/%s' % PATH , query_params = {})
12341234
1235- def test_list_dataset_tables_explicit (self ):
1235+ def test_list_tables_explicit (self ):
12361236 from google .cloud .bigquery .table import TableListItem
12371237
12381238 TABLE_1 = 'table_one'
@@ -1261,7 +1261,7 @@ def test_list_dataset_tables_explicit(self):
12611261 conn = client ._connection = _make_connection (DATA )
12621262 dataset = client .dataset (self .DS_ID )
12631263
1264- iterator = client .list_dataset_tables (
1264+ iterator = client .list_tables (
12651265 dataset , max_results = 3 , page_token = TOKEN )
12661266 self .assertIs (iterator .dataset , dataset )
12671267 page = six .next (iterator .pages )
@@ -1280,11 +1280,11 @@ def test_list_dataset_tables_explicit(self):
12801280 path = '/%s' % PATH ,
12811281 query_params = {'maxResults' : 3 , 'pageToken' : TOKEN })
12821282
1283- def test_list_dataset_tables_wrong_type (self ):
1283+ def test_list_tables_wrong_type (self ):
12841284 creds = _make_credentials ()
12851285 client = self ._make_one (project = self .PROJECT , credentials = creds )
12861286 with self .assertRaises (TypeError ):
1287- client .list_dataset_tables (client .dataset (self .DS_ID ).table ("foo" ))
1287+ client .list_tables (client .dataset (self .DS_ID ).table ("foo" ))
12881288
12891289 def test_delete_dataset (self ):
12901290 from google .cloud .bigquery .dataset import Dataset
@@ -2395,7 +2395,7 @@ def test_query_w_query_parameters(self):
23952395 'parameterValue' : {'value' : '123' }
23962396 })
23972397
2398- def test_create_rows_wo_schema (self ):
2398+ def test_insert_rows_wo_schema (self ):
23992399 from google .cloud .bigquery .table import Table , _TABLE_HAS_NO_SCHEMA
24002400
24012401 creds = _make_credentials ()
@@ -2411,11 +2411,11 @@ def test_create_rows_wo_schema(self):
24112411 ]
24122412
24132413 with self .assertRaises (ValueError ) as exc :
2414- client .create_rows (table , ROWS )
2414+ client .insert_rows (table , ROWS )
24152415
24162416 self .assertEqual (exc .exception .args , (_TABLE_HAS_NO_SCHEMA ,))
24172417
2418- def test_create_rows_w_schema (self ):
2418+ def test_insert_rows_w_schema (self ):
24192419 import datetime
24202420 from google .cloud ._helpers import UTC
24212421 from google .cloud ._helpers import _datetime_to_rfc3339
@@ -2461,7 +2461,7 @@ def _row_data(row):
24612461 }
24622462
24632463 with mock .patch ('uuid.uuid4' , side_effect = map (str , range (len (ROWS )))):
2464- errors = client .create_rows (table , ROWS )
2464+ errors = client .insert_rows (table , ROWS )
24652465
24662466 self .assertEqual (len (errors ), 0 )
24672467 conn .api_request .assert_called_once ()
@@ -2470,7 +2470,7 @@ def _row_data(row):
24702470 self .assertEqual (req ['path' ], '/%s' % PATH )
24712471 self .assertEqual (req ['data' ], SENT )
24722472
2473- def test_create_rows_w_list_of_dictionaries (self ):
2473+ def test_insert_rows_w_list_of_dictionaries (self ):
24742474 import datetime
24752475 from google .cloud ._helpers import UTC
24762476 from google .cloud ._helpers import _datetime_to_rfc3339
@@ -2526,15 +2526,15 @@ def _row_data(row):
25262526 }
25272527
25282528 with mock .patch ('uuid.uuid4' , side_effect = map (str , range (len (ROWS )))):
2529- errors = client .create_rows (table , ROWS )
2529+ errors = client .insert_rows (table , ROWS )
25302530
25312531 self .assertEqual (len (errors ), 0 )
25322532 conn .api_request .assert_called_once_with (
25332533 method = 'POST' ,
25342534 path = '/%s' % PATH ,
25352535 data = SENT )
25362536
2537- def test_create_rows_w_list_of_Rows (self ):
2537+ def test_insert_rows_w_list_of_Rows (self ):
25382538 from google .cloud .bigquery .table import Table
25392539 from google .cloud .bigquery .table import SchemaField
25402540 from google .cloud .bigquery .table import Row
@@ -2570,15 +2570,15 @@ def _row_data(row):
25702570 }
25712571
25722572 with mock .patch ('uuid.uuid4' , side_effect = map (str , range (len (ROWS )))):
2573- errors = client .create_rows (table , ROWS )
2573+ errors = client .insert_rows (table , ROWS )
25742574
25752575 self .assertEqual (len (errors ), 0 )
25762576 conn .api_request .assert_called_once_with (
25772577 method = 'POST' ,
25782578 path = '/%s' % PATH ,
25792579 data = SENT )
25802580
2581- def test_create_rows_w_skip_invalid_and_ignore_unknown (self ):
2581+ def test_insert_rows_w_skip_invalid_and_ignore_unknown (self ):
25822582 from google .cloud .bigquery .table import Table , SchemaField
25832583
25842584 PATH = 'projects/%s/datasets/%s/tables/%s/insertAll' % (
@@ -2626,7 +2626,7 @@ def _row_data(row):
26262626 for index , row in enumerate (ROWS )],
26272627 }
26282628
2629- errors = client .create_rows (
2629+ errors = client .insert_rows (
26302630 table ,
26312631 ROWS ,
26322632 row_ids = [index for index , _ in enumerate (ROWS )],
@@ -2645,7 +2645,7 @@ def _row_data(row):
26452645 path = '/%s' % PATH ,
26462646 data = SENT )
26472647
2648- def test_create_rows_w_repeated_fields (self ):
2648+ def test_insert_rows_w_repeated_fields (self ):
26492649 from google .cloud .bigquery .table import Table , SchemaField
26502650
26512651 PATH = 'projects/%s/datasets/%s/tables/%s/insertAll' % (
@@ -2677,15 +2677,15 @@ def _row_data(row):
26772677 }
26782678
26792679 with mock .patch ('uuid.uuid4' , side_effect = map (str , range (len (ROWS )))):
2680- errors = client .create_rows (table , ROWS )
2680+ errors = client .insert_rows (table , ROWS )
26812681
26822682 self .assertEqual (len (errors ), 0 )
26832683 conn .api_request .assert_called_once_with (
26842684 method = 'POST' ,
26852685 path = '/%s' % PATH ,
26862686 data = SENT )
26872687
2688- def test_create_rows_w_record_schema (self ):
2688+ def test_insert_rows_w_record_schema (self ):
26892689 from google .cloud .bigquery .table import SchemaField
26902690
26912691 PATH = 'projects/%s/datasets/%s/tables/%s/insertAll' % (
@@ -2723,7 +2723,7 @@ def _row_data(row):
27232723 }
27242724
27252725 with mock .patch ('uuid.uuid4' , side_effect = map (str , range (len (ROWS )))):
2726- errors = client .create_rows (self .TABLE_REF , ROWS ,
2726+ errors = client .insert_rows (self .TABLE_REF , ROWS ,
27272727 selected_fields = [full_name , phone ])
27282728
27292729 self .assertEqual (len (errors ), 0 )
@@ -2732,7 +2732,7 @@ def _row_data(row):
27322732 path = '/%s' % PATH ,
27332733 data = SENT )
27342734
2735- def test_create_rows_errors (self ):
2735+ def test_insert_rows_errors (self ):
27362736 from google .cloud .bigquery .table import Table
27372737
27382738 ROWS = [
@@ -2748,17 +2748,17 @@ def test_create_rows_errors(self):
27482748
27492749 # table ref with no selected fields
27502750 with self .assertRaises (ValueError ):
2751- client .create_rows (self .TABLE_REF , ROWS )
2751+ client .insert_rows (self .TABLE_REF , ROWS )
27522752
27532753 # table with no schema
27542754 with self .assertRaises (ValueError ):
2755- client .create_rows (Table (self .TABLE_REF ), ROWS )
2755+ client .insert_rows (Table (self .TABLE_REF ), ROWS )
27562756
27572757 # neither Table nor tableReference
27582758 with self .assertRaises (TypeError ):
2759- client .create_rows (1 , ROWS )
2759+ client .insert_rows (1 , ROWS )
27602760
2761- def test_create_rows_json (self ):
2761+ def test_insert_rows_json (self ):
27622762 from google .cloud .bigquery .table import Table , SchemaField
27632763 from google .cloud .bigquery .dataset import DatasetReference
27642764
@@ -2804,7 +2804,7 @@ def test_create_rows_json(self):
28042804 }
28052805
28062806 with mock .patch ('uuid.uuid4' , side_effect = map (str , range (len (ROWS )))):
2807- errors = client .create_rows_json (table , ROWS )
2807+ errors = client .insert_rows_json (table , ROWS )
28082808
28092809 self .assertEqual (len (errors ), 0 )
28102810 conn .api_request .assert_called_once_with (
0 commit comments