mirror of
https://github.com/lilydjwg/nvchecker.git
synced 2025-03-10 06:14:02 +00:00
add testcases for AUR
This commit is contained in:
parent
5db3b93dcd
commit
0047c6ddac
2 changed files with 11 additions and 4 deletions
|
@ -15,9 +15,7 @@ class ExternalVersionTestCase(tornado.testing.AsyncTestCase):
|
||||||
if isinstance(config, dict):
|
if isinstance(config, dict):
|
||||||
_config = configparser.ConfigParser(dict_type=dict, allow_no_value=True)
|
_config = configparser.ConfigParser(dict_type=dict, allow_no_value=True)
|
||||||
_config.read_dict({name: config})
|
_config.read_dict({name: config})
|
||||||
_config = _config[name]
|
config = _config[name]
|
||||||
else:
|
|
||||||
_config = config
|
|
||||||
|
|
||||||
get_version(name, _config, get_version_callback)
|
get_version(name, config, get_version_callback)
|
||||||
return self.wait()
|
return self.wait()
|
||||||
|
|
9
tests/test_aur.py
Normal file
9
tests/test_aur.py
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
from tests.helper import ExternalVersionTestCase
|
||||||
|
|
||||||
|
|
||||||
|
class AURTest(ExternalVersionTestCase):
|
||||||
|
def test_aur(self):
|
||||||
|
self.assertEqual(self.sync_get_version("asciidoc-fake", {"aur": None}), "1.0-1")
|
||||||
|
|
||||||
|
def test_aur_strip_release(self):
|
||||||
|
self.assertEqual(self.sync_get_version("asciidoc-fake", {"aur": None, "strip-release": 1}), "1.0")
|
Loading…
Add table
Reference in a new issue