def test_get_backend(self): backends = load_backends(('penelophant.auth.backends.PasswordAuth.PasswordAuth',)) from penelophant.auth.backends.PasswordAuth import PasswordAuth self.assertEqual(get_backend(PasswordAuth.provider), PasswordAuth)
def register_auth_backends(): """ Register auth backends from config """ load_backends(app.config['AUTH_BACKENDS'])
def test_load_backends(self): backends = load_backends(('penelophant.auth.backends.PasswordAuth.PasswordAuth',)) self.assertEqual(len(backends), 1) from penelophant.auth.backends.PasswordAuth import PasswordAuth self.assertEqual(backends[PasswordAuth.provider], PasswordAuth)