コード例 #1
0
ファイル: auth_test.py プロジェクト: adilhz/tipfy
    def test_login_with_form(self):
        user = User.create("foo", "foo_id", password="******")
        with self.get_app().get_test_context() as request:
            store = MultiAuthStore(request)
            res = store.login_with_form("foo", "bar", remember=True)
            self.assertEqual(res, True)

            res = store.login_with_form("foo", "bar", remember=False)
            self.assertEqual(res, True)
コード例 #2
0
    def test_login_with_form(self):
        user = User.create('foo', 'foo_id', password='******')
        with self.get_app().get_test_context() as request:
            store = MultiAuthStore(request)
            res = store.login_with_form('foo', 'bar', remember=True)
            self.assertEqual(res, True)

            res = store.login_with_form('foo', 'bar', remember=False)
            self.assertEqual(res, True)
コード例 #3
0
ファイル: test_auth.py プロジェクト: AmirS2/tipfy
    def test_login_with_form(self):
        user = User.create('foo', 'foo_id', password='******')
        app = self.get_app()
        request = Request.from_values('/')
        local.current_handler = RequestHandler(app, request)

        store = MultiAuthStore(local.current_handler)
        res = store.login_with_form('foo', 'bar', remember=True)
        self.assertEqual(res, True)

        res = store.login_with_form('foo', 'bar', remember=False)
        self.assertEqual(res, True)
コード例 #4
0
ファイル: test_auth.py プロジェクト: AmirS2/tipfy
    def test_login_with_form_invalid(self):
        app = self.get_app()
        request = Request.from_values('/')
        local.current_handler = RequestHandler(app, request)

        store = MultiAuthStore(local.current_handler)
        res = store.login_with_form('foo', 'bar', remember=True)

        self.assertEqual(res, False)
コード例 #5
0
ファイル: auth_test.py プロジェクト: adilhz/tipfy
 def test_login_with_form_invalid(self):
     with self.get_app().get_test_context() as request:
         store = MultiAuthStore(request)
         res = store.login_with_form("foo", "bar", remember=True)
         self.assertEqual(res, False)
コード例 #6
0
 def test_login_with_form_invalid(self):
     with self.get_app().get_test_context() as request:
         store = MultiAuthStore(request)
         res = store.login_with_form('foo', 'bar', remember=True)
         self.assertEqual(res, False)