summaryrefslogtreecommitdiff
path: root/yarns/900-implements.yarn
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-12-03 19:07:24 +0200
committerLars Wirzenius <liw@liw.fi>2017-12-03 20:12:51 +0200
commit4e9b1ddfae711ce38d743a3faccf49447ab10f75 (patch)
tree104858cae517e80b1507c0519fc21885c2a605f2 /yarns/900-implements.yarn
parent107ffc0a60de703d84957cf6d8948ed7d61d7362 (diff)
downloadick2-4e9b1ddfae711ce38d743a3faccf49447ab10f75.tar.gz
Add: blob service
Diffstat (limited to 'yarns/900-implements.yarn')
-rw-r--r--yarns/900-implements.yarn8
1 files changed, 4 insertions, 4 deletions
diff --git a/yarns/900-implements.yarn b/yarns/900-implements.yarn
index 6f9d423..afddb3b 100644
--- a/yarns/900-implements.yarn
+++ b/yarns/900-implements.yarn
@@ -45,11 +45,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
path = get_next_match()
token = get_token(user)
url = vars['bsurl']
- status, content_type, headers, body = get(url + path, token)
+ status, content_type, headers, body = get_blob(url + path, token)
vars['status_code'] = status
vars['content_type'] = content_type
vars['headers'] = headers
- vars['body'] = body
+ vars['body'] = body.encode('hex')
IMPLEMENTS WHEN (\S+) makes request GET (\S+) with an invalid token
user = get_next_match()
@@ -88,7 +88,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
vars['status_code'] = status
vars['content_type'] = content_type
vars['headers'] = headers
- vars['body'] = body
+ vars['body'] = body.encode('hex')
IMPLEMENTS WHEN (\S+) makes request PUT (\S+) with a valid token and body (.+)
user = get_next_match()
@@ -162,7 +162,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
IMPLEMENTS THEN body is the same as the blob (\S+)
filename = get_next_match()
blob = cat(filename)
- body = vars['body']
+ body = vars['body'].decode('hex')
assertEqual(body, blob)
IMPLEMENTS THEN version in body matches version from setup.py