diff --git a/tests/helper.py b/tests/helper.py index 280e72c..3e45361 100644 --- a/tests/helper.py +++ b/tests/helper.py @@ -15,9 +15,7 @@ class ExternalVersionTestCase(tornado.testing.AsyncTestCase): if isinstance(config, dict): _config = configparser.ConfigParser(dict_type=dict, allow_no_value=True) _config.read_dict({name: config}) - _config = _config[name] - else: - _config = config + config = _config[name] - get_version(name, _config, get_version_callback) + get_version(name, config, get_version_callback) return self.wait() diff --git a/tests/test_aur.py b/tests/test_aur.py new file mode 100644 index 0000000..6559ad3 --- /dev/null +++ b/tests/test_aur.py @@ -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")