nvchecker/tests/test_repology.py
2020-08-17 16:31:59 +08:00

21 lines
522 B
Python

# MIT licensed
# Copyright (c) 2019-2020 lilydjwg <lilydjwg@gmail.com>, et al.
import pytest
pytestmark = [pytest.mark.asyncio,
pytest.mark.needs_net]
async def test_repology(get_version):
assert await get_version("ssed", {
"source": "repology",
"repo": "aur",
}) == "3.62"
async def test_repology_no_repo(get_version):
try:
assert await get_version("ssed", {
"source": "repology",
}) is None
except RuntimeError as e:
assert "repo field is required" in str(e)