Beispiel #1
0
def before_feature(context, feature):
    app.config['SQLALCHEMY_DATABASE_URI'] = DB_URI
    app.testing = True
    context.client = app.test_client()
    with app.app_context():
        init_db()
        seed_categories()
    def setUp(self):
        models.database.initialize(peewee.SqliteDatabase(':memory:'))

        from manage import init_db
        init_db()

        self.app = webtest.TestApp(finances.app)
Beispiel #3
0
 def __init__(self, method_name='runTest'):
     from manage import init_db
     init_db()
     super(ResourceTestCase, self).__init__(method_name)
     self.api_url = None
     self.model = None
     self.data = None
     self.updated = None
     self.fields = None
Beispiel #4
0
 def setUpClass(cls):
     """Setup code for the test case"""
     # Create an app instance using the testing configuration
     cls.app = create_app("testing")
     # Initialize the testing database
     manage.init_db(no_confirm=True)
Beispiel #5
0
	def setUpClass(cls):

		# Create an app instance using the testing configuration
		cls.app = create_app('testing')

		manage.init_db(no_confirm=True)
Beispiel #6
0
def init_demon():
    global logger
    logger = Logger()
    init_db(Config.VIKI_DB_URI)
Beispiel #7
0
 def setUpClass(cls):
     '''Setup code for the test case'''
     # Create an app instance using the testing configuration
     cls.app = create_app('testing')
     # Initialize the testing database
     manage.init_db(no_confirm=True)
Beispiel #8
0
 def setUp(self):
     """Set up each test: initialize test client and database, disable rate limiter."""
     smog.app.config.from_object('smog.config_test')
     self.app = smog.app.test_client()
     init_db()
     smog.limiter.enabled = False
 def __init__(self, method_name='runTest'):
     super().__init__(method_name)
     from manage import init_db
     init_db()