Add a testcase for Regex

This commit is contained in:
Felix Yan 2015-11-04 23:43:35 +08:00
parent d36b11321d
commit 7595011cbb
1 changed files with 10 additions and 0 deletions

10
tests/test_regex.py Normal file
View File

@ -0,0 +1,10 @@
from tests.helper import ExternalVersionTestCase
class RegexTest(ExternalVersionTestCase):
def test_regex(self):
self.assertEqual(self.sync_get_version("example", {
"url": "https://httpbin.org/get",
"regex": '"User-Agent": "(\w+)"',
"user_agent": "Meow",
}), "Meow")