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
1 changed files with 7 additions and 3 deletions

View File

@ -4,9 +4,13 @@
import pytest
pytestmark = pytest.mark.asyncio
@pytest.mark.skipif(True,
reason='httpbin is overloaded?')
async def test_regex_httpbin(get_version):
async def test_regex_httpbin_default_user_agent(get_version):
assert await get_version("example", {
"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", {
"url": "https://httpbin.org/get",
"regex": r'"User-Agent": "(\w+)"',