Move global IOLoop hack to helper

This commit is contained in:
Felix Yan 2015-11-04 21:25:01 +08:00
parent f48fdbc441
commit f1cca7388b
2 changed files with 5 additions and 5 deletions

View File

@ -1,8 +1,12 @@
from nvchecker.get_version import get_version
from tornado.ioloop import IOLoop
import tornado.testing
from nvchecker.get_version import get_version
class ExternalVersionTestCase(tornado.testing.AsyncTestCase):
def get_new_ioloop(self):
return IOLoop.instance()
def sync_get_version(self, name, config):
def get_version_callback(name, version):
self.stop(version)

View File

@ -1,10 +1,6 @@
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")