tests: test default user agent in test_regex

This commit is contained in:
lilydjwg 2019-07-06 14:23:00 +08:00
parent 8b0186bd25
commit ed37892c87

View file

@ -4,9 +4,13 @@
import pytest import pytest
pytestmark = pytest.mark.asyncio pytestmark = pytest.mark.asyncio
@pytest.mark.skipif(True, async def test_regex_httpbin_default_user_agent(get_version):
reason='httpbin is overloaded?') assert await get_version("example", {
async def test_regex_httpbin(get_version): "url": "https://httpbin.org/get",
"regex": r'"User-Agent": "([^"]+)"',
}) == "lilydjwg/nvchecker"
async def test_regex_httpbin_user_agent(get_version):
assert await get_version("example", { assert await get_version("example", {
"url": "https://httpbin.org/get", "url": "https://httpbin.org/get",
"regex": r'"User-Agent": "(\w+)"', "regex": r'"User-Agent": "(\w+)"',