diff options
author | Tomás Touceda <chiiph@leap.se> | 2013-05-27 12:44:15 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2013-05-27 12:44:15 -0300 |
commit | aa05d0c2076984ffe7e9b1f3ee84b7b1c0dea6b8 (patch) | |
tree | 11931448cecb041f4adaea3b8161b479e135f206 /src/leap/soledad/tests/test_leap_backend.py | |
parent | 8cef16cd458801b1513bbcd6849edc4599204b6f (diff) | |
parent | 6238f80b9d9c8ea7091e196ccb69371050fd45db (diff) |
Merge remote-tracking branch 'drebs/feature/2356-prevent-some-db-actions-in-server' into develop
Diffstat (limited to 'src/leap/soledad/tests/test_leap_backend.py')
-rw-r--r-- | src/leap/soledad/tests/test_leap_backend.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/leap/soledad/tests/test_leap_backend.py b/src/leap/soledad/tests/test_leap_backend.py index 2e4b3b01..d04ee412 100644 --- a/src/leap/soledad/tests/test_leap_backend.py +++ b/src/leap/soledad/tests/test_leap_backend.py @@ -23,24 +23,23 @@ Test Leap backend bits. import u1db import os import ssl -try: - import simplejson as json -except ImportError: - import json # noqa +import simplejson as json import cStringIO + from u1db.sync import Synchronizer from u1db.remote import ( http_client, http_database, http_target, ) +from routes.mapper import Mapper from leap import soledad from leap.soledad.backends import leap_backend from leap.soledad.server import ( SoledadApp, - SoledadAuthMiddleware + SoledadAuthMiddleware, ) from leap.soledad import auth @@ -78,8 +77,13 @@ def make_token_soledad_app(state): return True return False + # we test for action authorization in leap.soledad.tests.test_server + def verify_action(environ, uuid): + return True + application = SoledadAuthMiddleware(app) application.verify_token = verify_token + application.verify_action = verify_action return application |