nvchecker/tests/test_repology.py

21 lines
522 B
Python
Raw Normal View History

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