def setUpClass(cls): """ Initialize a test DB and call to make fixtures. """ cls.app = app db.create_all() cls.fixtures = Fixtures() cls.fixtures.make_fixtures() cls.fixtures.test_client = app.test_client()
def setUpClass(cls): """ Initialize a test DB and call to make fixtures. """ cls.app = app db.create_all() cls.fixtures = Fixtures() cls.fixtures.make_fixtures() cls.fixtures.test_client = app.test_client()
def setUp(self): """ Initialize a test DB and call to make fixtures. """ self.ctx = app.test_request_context() self.ctx.push() self.app = app db.create_all() self.client = app.test_client() self.fixtures = Fixtures() self.fixtures.make_fixtures()
def setUp(self): """ Initialize a test DB and call to make fixtures. """ self.ctx = app.test_request_context() self.ctx.push() self.app = app db.create_all() self.client = app.test_client() self.fixtures = Fixtures() self.fixtures.make_fixtures()
def when_login_form_submit(context): context.test_user['form.id'] = "passwordlogin" with app.test_client() as c: c.post('/login', data=context.test_user, follow_redirects=True) context.user = g.user
def when_login_form_submit(context): context.test_user['form.id'] = "passwordlogin" with app.test_client() as c: c.post('/login', data=context.test_user, follow_redirects=True) context.user = current_auth.user