From 793b1ad0dade4afcdb8ef4a3bc81c53fd1a47f6d Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Wed, 4 Nov 2015 20:15:43 +0800 Subject: [PATCH 1/5] Add a testcase for PyPI --- tests/test_pypi.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 tests/test_pypi.py diff --git a/tests/test_pypi.py b/tests/test_pypi.py new file mode 100644 index 0000000..59a4fa5 --- /dev/null +++ b/tests/test_pypi.py @@ -0,0 +1,6 @@ +from tests.helper import ExternalVersionTestCase + + +class PyPITest(ExternalVersionTestCase): + def test_pypi(self): + self.assertEqual(self.sync_get_version("example", {"pypi": None}), "0.1.0") From 5ae52b9e16b073322550f0a7ed9d560f5f823847 Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Wed, 4 Nov 2015 20:17:37 +0800 Subject: [PATCH 2/5] Add a testcase for Hackage --- tests/test_hackage.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 tests/test_hackage.py diff --git a/tests/test_hackage.py b/tests/test_hackage.py new file mode 100644 index 0000000..b754aae --- /dev/null +++ b/tests/test_hackage.py @@ -0,0 +1,6 @@ +from tests.helper import ExternalVersionTestCase + + +class HackageTest(ExternalVersionTestCase): + def test_hackage(self): + self.assertEqual(self.sync_get_version("sessions", {"hackage": None}), "2008.7.18") From 10ac7ea7a67b7a15146ae7c9c0ba9ba74876df81 Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Wed, 4 Nov 2015 20:18:37 +0800 Subject: [PATCH 3/5] Add a testcase for RubyGems --- tests/test_gems.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 tests/test_gems.py diff --git a/tests/test_gems.py b/tests/test_gems.py new file mode 100644 index 0000000..1ea2fa3 --- /dev/null +++ b/tests/test_gems.py @@ -0,0 +1,6 @@ +from tests.helper import ExternalVersionTestCase + + +class RubyGemsTest(ExternalVersionTestCase): + def test_gems(self): + self.assertEqual(self.sync_get_version("example", {"gems": None}), "1.0.2") From f7287bdf569374757880a70e4c2e3a69ed31295e Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Wed, 4 Nov 2015 20:20:25 +0800 Subject: [PATCH 4/5] Add a testcase for CPAN --- tests/test_cpan.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 tests/test_cpan.py diff --git a/tests/test_cpan.py b/tests/test_cpan.py new file mode 100644 index 0000000..d11f7a4 --- /dev/null +++ b/tests/test_cpan.py @@ -0,0 +1,6 @@ +from tests.helper import ExternalVersionTestCase + + +class CPANTest(ExternalVersionTestCase): + def test_cpan(self): + self.assertEqual(self.sync_get_version("POE-Component-Server-HTTPServer", {"cpan": None}), "0.9.2") From f5fb79cc637aa0305b4cbea144330208d2da0378 Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Wed, 4 Nov 2015 20:24:52 +0800 Subject: [PATCH 5/5] Add a testcase for Command --- tests/test_cmd.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 tests/test_cmd.py diff --git a/tests/test_cmd.py b/tests/test_cmd.py new file mode 100644 index 0000000..053364f --- /dev/null +++ b/tests/test_cmd.py @@ -0,0 +1,10 @@ +from tornado.ioloop import IOLoop +from tests.helper import ExternalVersionTestCase + + +class CMDTest(ExternalVersionTestCase): + def get_new_ioloop(self): + return IOLoop.instance() + + def test_cmd(self): + self.assertEqual(self.sync_get_version("example", {"cmd": "echo Meow"}), "Meow")