update tests

This commit is contained in:
lilydjwg 2019-07-04 16:47:33 +08:00
parent 3194ef8e6c
commit 93d1ca16db
3 changed files with 4 additions and 4 deletions

View File

@ -5,4 +5,4 @@ import pytest
pytestmark = pytest.mark.asyncio
async def test_anitya(get_version):
assert await get_version("shutter", {"anitya": "fedora/shutter"}) == "0.94.2"
assert await get_version("shutter", {"anitya": "fedora/shutter"}) == "0.94.3"

View File

@ -9,14 +9,14 @@ pytestmark = pytest.mark.asyncio
async def test_regex_httpbin(get_version):
assert await get_version("example", {
"url": "https://httpbin.org/get",
"regex": '"User-Agent": "(\w+)"',
"regex": r'"User-Agent": "(\w+)"',
"user_agent": "Meow",
}) == "Meow"
async def test_regex(get_version):
assert await get_version("example", {
"url": "http://example.net/",
"regex": 'for (\w+) examples',
"regex": r'for (\w+) examples',
}) == "illustrative"
async def test_missing_ok(get_version):

View File

@ -17,4 +17,4 @@ async def test_substitute_regex_missing_ok(get_version):
assert await get_version("example", {"manual": "r15", "from_pattern": r"r(\d+)([a-z])", "to_pattern": r"r\1.\2"}) == "r15"
async def test_substitute_prefix_has_higher_priority(get_version):
assert await get_version("example", {"manual": "r15", "prefix": "r", "from_pattern": "r(\d+)", "to_pattern": "R\1"}) == "15"
assert await get_version("example", {"manual": "r15", "prefix": "r", "from_pattern": r"r(\d+)", "to_pattern": r"R\1"}) == "15"