Merge remote-tracking branch 'origin/pr/25'
This commit is contained in:
commit
d36b11321d
|
@ -1,3 +1,4 @@
|
|||
import configparser
|
||||
from tornado.ioloop import IOLoop
|
||||
import tornado.testing
|
||||
from nvchecker.get_version import get_version
|
||||
|
@ -11,5 +12,10 @@ class ExternalVersionTestCase(tornado.testing.AsyncTestCase):
|
|||
def get_version_callback(name, version):
|
||||
self.stop(version)
|
||||
|
||||
if isinstance(config, dict):
|
||||
_config = configparser.ConfigParser(dict_type=dict, allow_no_value=True)
|
||||
_config.read_dict({name: config})
|
||||
config = _config[name]
|
||||
|
||||
get_version(name, config, get_version_callback)
|
||||
return self.wait()
|
||||
|
|
|
@ -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…
Reference in New Issue