コード例 #1
0
 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
コード例 #2
0
ファイル: test_sandman.py プロジェクト: blueoxss/sandman
 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
コード例 #3
0
ファイル: test_sandman.py プロジェクト: HengeSense/sandman
 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
コード例 #4
0
 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
コード例 #5
0
ファイル: test_sandman.py プロジェクト: wireandbyte/sandman
 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