diff options
author | Milo Casagrande <milo.casagrande@linaro.org> | 2014-09-11 16:20:22 +0200 |
---|---|---|
committer | Milo Casagrande <milo.casagrande@linaro.org> | 2014-09-11 16:20:22 +0200 |
commit | 4fc369af8d87fede67f117ecb3eb5af37877275e (patch) | |
tree | 24c492b22faacc6c766ee8d5c9a5954144c5e7f2 /app/handlers/boot.py | |
parent | 27c5e61b102e9a520a640d7d44b35866c694de47 (diff) |
handlers: Refactor common methods into module.
* Move all the handlers common methods into a single
module (making them "static").
* Refactor methods and tests.
* Add new tests.
Change-Id: Ied713e6d5a9d4c16dcc27794509bdc6dd1193c1f
Diffstat (limited to 'app/handlers/boot.py')
-rw-r--r-- | app/handlers/boot.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/handlers/boot.py b/app/handlers/boot.py index 062e3e1..199af93 100644 --- a/app/handlers/boot.py +++ b/app/handlers/boot.py @@ -16,6 +16,7 @@ """The RequestHandler for /boot URLs.""" from handlers.base import BaseHandler +from handlers.common import get_query_spec from handlers.response import HandlerResponse from models import ( BOARD_KEY, @@ -82,7 +83,9 @@ class BootHandler(BaseHandler): response = HandlerResponse(404) response.reason = "Resource '%s' not found" % doc_id else: - spec = self._get_query_spec('DELETE') + spec = get_query_spec( + self.get_query_arguments, self._valid_keys("DELETE") + ) if spec: response = self._delete(spec) if response.status_code == 200: |