summaryrefslogtreecommitdiff
path: root/src/leap/soledad/tests/test_leap_backend.py
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2013-05-24 12:59:21 -0300
committerdrebs <drebs@leap.se>2013-05-25 11:20:13 -0300
commitd022428a695ba5c499fcd0c8a9681962c006b8e8 (patch)
tree5d0d3a525f81a39f2982c114b5f048ee2af322d3 /src/leap/soledad/tests/test_leap_backend.py
parent8cef16cd458801b1513bbcd6849edc4599204b6f (diff)
Add action validation in server.
* Use routes for validating user actions when interacting with server. * Also add tests for action validation. * Add changes file. * Closes #2356.
Diffstat (limited to 'src/leap/soledad/tests/test_leap_backend.py')
-rw-r--r--src/leap/soledad/tests/test_leap_backend.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/leap/soledad/tests/test_leap_backend.py b/src/leap/soledad/tests/test_leap_backend.py
index 2e4b3b01..458fc5d5 100644
--- a/src/leap/soledad/tests/test_leap_backend.py
+++ b/src/leap/soledad/tests/test_leap_backend.py
@@ -35,12 +35,13 @@ from u1db.remote import (
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 +79,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