From ed37892c874b88264bd168775a3251f3bce000f7 Mon Sep 17 00:00:00 2001 From: lilydjwg Date: Sat, 6 Jul 2019 14:23:00 +0800 Subject: [PATCH] tests: test default user agent in test_regex --- tests/test_regex.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/test_regex.py b/tests/test_regex.py index 0c1ac72..d131cdd 100644 --- a/tests/test_regex.py +++ b/tests/test_regex.py @@ -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+)"',