fix test_regex
This commit is contained in:
parent
981143f62b
commit
1e1f431f9b
|
@ -1,14 +1,15 @@
|
|||
# MIT licensed
|
||||
# Copyright (c) 2013-2017 lilydjwg <lilydjwg@gmail.com>, et al.
|
||||
# Copyright (c) 2013-2019 lilydjwg <lilydjwg@gmail.com>, et al.
|
||||
|
||||
import pytest
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
async def test_regex_httpbin_default_user_agent(get_version):
|
||||
assert await get_version("example", {
|
||||
ua = await get_version("example", {
|
||||
"url": "https://httpbin.org/get",
|
||||
"regex": r'"User-Agent": "([^"]+)"',
|
||||
}) == "lilydjwg/nvchecker"
|
||||
})
|
||||
assert ua.startswith("lilydjwg/nvchecker")
|
||||
|
||||
async def test_regex_httpbin_user_agent(get_version):
|
||||
assert await get_version("example", {
|
||||
|
|
Loading…
Reference in New Issue