コード例 #1
0
ファイル: test_db.py プロジェクト: harishr1308/lastuser
 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()
コード例 #2
0
ファイル: test_db.py プロジェクト: hasgeek/lastuser
 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()
コード例 #3
0
ファイル: test_db.py プロジェクト: harishr1308/lastuser
    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()
コード例 #4
0
ファイル: test_db.py プロジェクト: bugrevelio/lastuser
    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()
コード例 #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
コード例 #6
0
ファイル: failed_login.py プロジェクト: bugrevelio/lastuser
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