From f5e8890e5adeeadae130417e0735a90afff3da5c Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sun, 25 Sep 2016 19:52:22 +0300 Subject: Implement http body matching --- 900-implements.yarn | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to '900-implements.yarn') 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) -- cgit v1.2.1