#NEWLINE# def __init__( self , database = 'main' , connection = None ) : #NEWLINE# #INDENT# "Create a database fixture.\n\n        :param database: The type of database, 'main' or 'api'\n        :param connection: The connection string to use\n        " #NEWLINE# super ( Database , self ) . __init__ ( ) #NEWLINE# global SESSION_CONFIGURED #NEWLINE# if ( not SESSION_CONFIGURED ) : #NEWLINE# #INDENT# session . configure ( CONF ) #NEWLINE# SESSION_CONFIGURED = True #NEWLINE# #UNINDENT# self . database = database #NEWLINE# if ( database == 'main' ) : #NEWLINE# #INDENT# if ( self is not None ) : #NEWLINE# #INDENT# ctxt_mgr = session . create_context_manager ( connection = connection ) #NEWLINE# facade = ctxt_mgr . get_legacy_facade ( ) #NEWLINE# self . get_engine = facade . get_engine #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . get_engine = session . get_engine #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( database == 'api' ) : #NEWLINE# #INDENT# self . get_engine = session . get_api_engine