def get_backend(self, provider): """ Get auth backend """ backend = get_backend(provider) if not backend: abort(404, message='Unknown provider') return backend
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)