summaryrefslogtreecommitdiff
path: root/yarns
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-10-05 16:58:30 +0300
committerLars Wirzenius <liw@liw.fi>2017-10-05 18:02:49 +0300
commit779dec3e19b4d80884bdbf49121846554c477432 (patch)
tree1995f0cb31fd1db06cfac2a0b4834c9f6bbf25c8 /yarns
parent6500f063ecdd285ed3d956068941c957b55855a1 (diff)
downloadqvisqve-779dec3e19b4d80884bdbf49121846554c477432.tar.gz
Add: scenario step to check number of resources found
Diffstat (limited to 'yarns')
-rw-r--r--yarns/900-implements.yarn9
1 files changed, 9 insertions, 0 deletions
diff --git a/yarns/900-implements.yarn b/yarns/900-implements.yarn
index f760e20..a5c267d 100644
--- a/yarns/900-implements.yarn
+++ b/yarns/900-implements.yarn
@@ -213,5 +213,14 @@ Start a Qvarn running in the background.
print 'id', repr(obj['id'])
vars[id_name] = obj['id']
+ IMPLEMENTS THEN search result has (\d+) resources
+ wanted = int(get_next_match())
+ body = json.loads(vars['body'])
+ print 'body', repr(body)
+ resources = body['resources']
+ print 'resources', repr(resources)
+ print 'len resources', len(resources)
+ assertEqual(wanted, len(resources))
+
IMPLEMENTS THEN response has header WWW-Authenticate containing "(.+)"
assert 0