diff options
author | Lars Wirzenius <liw@liw.fi> | 2016-09-25 19:52:22 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2016-09-25 19:52:22 +0300 |
commit | f5e8890e5adeeadae130417e0735a90afff3da5c (patch) | |
tree | 4017e2bff48e355f2c8f0e0206425831905e7699 /900-implements.yarn | |
parent | 13f8989a714563077e96446a76658d52b13ec8af (diff) | |
download | server-yarns-f5e8890e5adeeadae130417e0735a90afff3da5c.tar.gz |
Implement http body matching
Diffstat (limited to '900-implements.yarn')
-rw-r--r-- | 900-implements.yarn | 7 |
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) |