diff options
author | 2018-08-07 15:09:08 +0100 | |
---|---|---|
committer | 2018-08-07 15:09:16 +0100 | |
commit | af54db6c136138c66cf5ca72419989525a0baa5c (patch) | |
tree | 8519aeab8d45277c51797c7dc23aacf3b56ed1bb /pysite/views/tests | |
parent | A wizard is never late, nor is he early. (diff) |
Initial project layout for django
Diffstat (limited to 'pysite/views/tests')
-rw-r--r-- | pysite/views/tests/__init__.py | 1 | ||||
-rw-r--r-- | pysite/views/tests/index.py | 23 |
2 files changed, 0 insertions, 24 deletions
diff --git a/pysite/views/tests/__init__.py b/pysite/views/tests/__init__.py deleted file mode 100644 index adfc1286..00000000 --- a/pysite/views/tests/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# .gitkeep diff --git a/pysite/views/tests/index.py b/pysite/views/tests/index.py deleted file mode 100644 index f99e3f3c..00000000 --- a/pysite/views/tests/index.py +++ /dev/null @@ -1,23 +0,0 @@ -from flask import jsonify -from schema import Schema - -from pysite.base_route import APIView -from pysite.constants import ValidationTypes -from pysite.decorators import api_params - -LIST_SCHEMA = Schema([{"test": str}]) -DICT_SCHEMA = Schema({"segfault": str}) - - -class TestParamsView(APIView): - path = "/testparams" - name = "testparams" - - @api_params(schema=DICT_SCHEMA, validation_type=ValidationTypes.params) - def get(self, data): - return jsonify(data) - - @api_params(schema=LIST_SCHEMA, validation_type=ValidationTypes.params) - def post(self, data): - jsonified = jsonify(data) - return jsonified |