def setUp(self):
        self.app = Setup.create_app()
        with self.app.test_request_context():
            user = UserFactory()
            save_to_db(user)

            event = EventFactoryBasic()
            event.user_id = user.id
            save_to_db(event)

            # Authenticate User
            self.auth = {'Authorization': "JWT " + create_access_token(user.id, fresh=True)}
    def setUp(self):
        self.app = Setup.create_app()
        with app.test_request_context():
            user = UserFactory()
            db.session.add(user)
            db.session.commit()

            event = EventFactoryBasic()
            event.user_id = user.id
            db.session.add(event)
            db.session.commit()

            # Authenticate User
            self.auth = {'Authorization': "JWT " + str(_default_jwt_encode_handler(user), 'utf-8')}
    def setUp(self):
        self.app = Setup.create_app()
        with app.test_request_context():
            user = UserFactory()
            save_to_db(user)

            event = EventFactoryBasic()
            event.user_id = user.id
            save_to_db(event)

            # Authenticate User
            self.auth = {
                'Authorization':
                "JWT " + str(_default_jwt_encode_handler(user), 'utf-8')
            }
Esempio n. 4
0
 def setUp(self):
     self.app = Setup.create_app()
Esempio n. 5
0
 def Setup(self):
     self.app = Setup.create_app()
 def setUp(self):
     self.app = Setup.create_app()
Esempio n. 7
0
def database(app):
    _db.create_all()
    set_settings(app_name='Open Event', app_environment=Environment.TESTING)
    yield _db
    Setup.drop_db()
Esempio n. 8
0
 def tearDownClass(cls) -> None:
     Setup.drop_db()
Esempio n. 9
0
 def setUpClass(cls) -> None:
     cls.app = Setup.create_app()
Esempio n. 10
0
 def tearDown(self) -> None:
     Setup.drop_db()
Esempio n. 11
0
 def setUp(self) -> None:
     self.app = Setup.create_app()
Esempio n. 12
0
 def tearDown(self):
     Setup.drop_db()
Esempio n. 13
0
def database(app):
    _db.engine.execute('create extension if not exists citext')
    _db.create_all()
    set_settings(app_name='Open Event', app_environment=Environment.TESTING)
    yield _db
    Setup.drop_db()
Esempio n. 14
0
 def tearDown(self):
     Setup.drop_db()