def setup_method(self, _): """Grab the database file from the *data* directory and configure the app.""" shutil.copy(os.path.join(os.getcwd(), "sandman", "test", "data", "chinook"), self.DB_LOCATION) app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:////" + self.DB_LOCATION app.config["TESTING"] = True self.app = app.test_client() from . import models
def setup_method(self, _): """Grab the database file from the *data* directory and configure the app.""" shutil.copy( os.path.join(os.getcwd(), 'sandman', 'test', 'data', 'chinook'), self.DB_LOCATION) app.config[ 'SQLALCHEMY_DATABASE_URI'] = 'sqlite:////' + self.DB_LOCATION app.config['TESTING'] = True self.app = app.test_client() from . import models
def setup_method(self, _): """Grab the database file from the *data* directory and configure the app.""" shutil.copy( os.path.join( os.getcwd(), 'sandman', 'test', 'data', 'chinook'), self.DB_LOCATION) app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////' + self.DB_LOCATION app.config['TESTING'] = True self.app = app.test_client() from . import models
def setup_method(self, _): """Grab the database file from the *data* directory and configure the app.""" shutil.copy( os.path.join( os.getcwd(), 'tests', 'data', 'foreign_key.sqlite3'), self.DB_LOCATION) app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////' + self.DB_LOCATION app.config['SANDMAN_SHOW_PKS'] = False app.config['SANDMAN_GENERATE_PKS'] = True app.config['TESTING'] = True self.app = app.test_client() # pylint: disable=unused-variable from . import foreign_key_models
def setup_method(self, method): shutil.copy(os.path.join(os.getcwd(), 'sandman', 'test', 'data', 'chinook'), self.DB_LOCATION) app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////' + self.DB_LOCATION app.config['TESTING'] = True self.app = app.test_client() from . import models