summaryrefslogtreecommitdiff
path: root/900-implements.yarn
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2016-09-25 19:52:22 +0300
committerLars Wirzenius <liw@liw.fi>2016-09-25 19:52:22 +0300
commitf5e8890e5adeeadae130417e0735a90afff3da5c (patch)
tree4017e2bff48e355f2c8f0e0206425831905e7699 /900-implements.yarn
parent13f8989a714563077e96446a76658d52b13ec8af (diff)
downloadserver-yarns-f5e8890e5adeeadae130417e0735a90afff3da5c.tar.gz
Implement http body matching
Diffstat (limited to '900-implements.yarn')
-rw-r--r--900-implements.yarn7
1 files changed, 6 insertions, 1 deletions
diff --git a/900-implements.yarn b/900-implements.yarn
index 19c3f9c..0195a72 100644
--- a/900-implements.yarn
+++ b/900-implements.yarn
@@ -26,4 +26,9 @@
h.assertEqual(expected, actual)
IMPLEMENTS THEN HTTP body matches "(.*)"
- pass
+ import re, yarnhelper
+ h = yarnhelper.YarnHelper()
+ body = h.get_variable('http_body')
+ pattern = h.get_next_match()
+ m = re.search(pattern, body)
+ h.assertNotEqual(m, None)