#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# match = re . search ( '\\.([^\\.]+)$' , self . id ( ) ) #NEWLINE# if match : #NEWLINE# #INDENT# name = match . group ( 1 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# name = 'TestIngester' #NEWLINE# #UNINDENT# logfile_name = ( '%s.log' % name ) #NEWLINE# self . logfile_path = os . path . join ( self . OUTPUT_DIR , logfile_name ) #NEWLINE# self . expected_path = os . path . join ( self . EXPECTED_DIR , logfile_name ) #NEWLINE# self . handler = logging . FileHandler ( self . logfile_path , mode = 'w' ) #NEWLINE# self . handler . setLevel ( logging . INFO ) #NEWLINE# self . handler . setFormatter ( logging . Formatter ( '%(message)s' ) ) #NEWLINE# LOGGER . addHandler ( self . handler ) #NEWLINE# self . test_conn = None #NEWLINE# self . test_dbname = dbutil . random_name ( 'test_tile_contents' ) #NEWLINE# LOGGER . info ( 'Creating %s' , self . test_dbname ) #NEWLINE# dbutil . TESTSERVER . create ( self . test_dbname , self . INPUT_DIR , 'hypercube_empty.sql' ) #NEWLINE# configuration_dict = { #NEWLINE# #INDENT# 'dbname' : self . test_dbname , #NEWLINE# 'tile_root' : os . path . join ( self . OUTPUT_DIR , 'tiles' ) , #NEWLINE# #UNINDENT# } #NEWLINE# config_file_path = dbutil . update_config_file2 ( configuration_dict , self . INPUT_DIR , self . OUTPUT_DIR , 'test_datacube.conf' ) #NEWLINE# test_args = TestArgs ( ) #NEWLINE# test_args . config_file = config_file_path #NEWLINE# test_args . debug = False #NEWLINE# test_datacube = IngesterDataCube ( test_args ) #NEWLINE# self . ingester = TestIngester ( datacube = logfile_name ) #NEWLINE# self . collection = self . ingester . collection