예제 #1
0
파일: test_auth.py 프로젝트: Hazer/WebCore
class TestWebAuthMiddleware(WebTestCase):
    def setUp(self):
        self.wa = WebAuth(app_root, test_config, 'web.auth.')

    def test_exceptions(self):
        self.assertRaises(Exception, lambda: WebAuth(None))

    def test_get_method_null(self):
        self.assertEqual(self.wa.get_method(''), None)

    def test_get_method_shallow(self):
        foo = self.wa.get_method('web.core.application:Application')
        self.assertTrue(isinstance(foo(app_root), web.core.Application))

    def test_get_method_deep(self):
        foo = self.wa.get_method('web.core.application:Application.factory')
        foo(dict(), app_root)
예제 #2
0
파일: test_auth.py 프로젝트: Hazer/WebCore
 def setUp(self):
     self.wa = WebAuth(app_root, test_config, 'web.auth.')