diff options
author | Simo Sorce <simo@redhat.com> | 2015-04-25 15:40:03 -0400 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2015-04-27 15:06:32 -0400 |
commit | f85ee3c9ef9839b06c1af654a54e3e32175f7d2e (patch) | |
tree | 39bdecf2b92f0a6a18e6723685214d0fbd3dc1ec /custodia | |
parent | db42ea6f015d3d15728d1c26576531286c522ce7 (diff) | |
download | custodia-f85ee3c9ef9839b06c1af654a54e3e32175f7d2e.tar.gz custodia-f85ee3c9ef9839b06c1af654a54e3e32175f7d2e.tar.xz custodia-f85ee3c9ef9839b06c1af654a54e3e32175f7d2e.zip |
Add tests and fixes for 'simple' keys
A missing query would not lead to the default 'simple' type being selected.
Add tests for PUT/GET/DELETE of a simple key.
Signed-off-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'custodia')
-rw-r--r-- | custodia/secrets.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/custodia/secrets.py b/custodia/secrets.py index dd7a76a..735d0ed 100644 --- a/custodia/secrets.py +++ b/custodia/secrets.py @@ -183,7 +183,9 @@ class Secrets(HTTPConsumer): def _get_key(self, trail, request, response): # default to simple - query = request.get('query', {'type': 'simple', 'value': ''}) + query = request.get('query', '') + if len(query) == 0: + query = {'type': 'simple', 'value': ''} try: msg = self._parse(request, query) except Exception as e: |