#NEWLINE# def test_list_tables( self ) : #NEWLINE# #INDENT# dataset = Config . CLIENT . dataset ( DATASET_NAME ) #NEWLINE# self . assertFalse ( dataset . exists ( ) ) #NEWLINE# dataset . create ( ) #NEWLINE# self . to_delete . append ( dataset ) #NEWLINE# ( all_tables , token ) = dataset . list_tables ( ) #NEWLINE# self . assertEqual ( all_tables , [ ] ) #NEWLINE# self . assertEqual ( token , None ) #NEWLINE# tables_to_create = [ ( 'new' + unique_resource_id ( ) ) , ( 'newer' + unique_resource_id ( ) ) , ( 'newest' + unique_resource_id ( ) ) ] #NEWLINE# full_name = bigquery . SchemaField ( 'full_name' , 'STRING' , mode = 'REQUIRED' ) #NEWLINE# age = bigquery . SchemaField ( 'age' , 'INTEGER' , mode = 'REQUIRED' ) #NEWLINE# for table_name in tables_to_create : #NEWLINE# #INDENT# table = dataset . table ( table_name , schema = [ full_name , age ] ) #NEWLINE# table . create ( ) #NEWLINE# self . to_delete . insert ( 0 , table ) #NEWLINE# #UNINDENT# ( all_tables , token ) = dataset . list_tables ( ) #NEWLINE# self . assertTrue ( ( token is None ) ) #NEWLINE# created = [ table for table in all_tables if ( ( table . name in tables_to_create ) and ( table . dataset_name == DATASET_NAME ) ) ] #NEWLINE# self . assertEqual ( len ( created ) , len ( tables_to_create ) )