Ejemplo n.º 1
0
 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()
Ejemplo n.º 2
0
 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()
Ejemplo n.º 3
0
    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()
Ejemplo n.º 4
0
    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()
Ejemplo n.º 5
0
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
Ejemplo n.º 6
0
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