Move global IOLoop hack to helper
This commit is contained in:
parent
f48fdbc441
commit
f1cca7388b
|
@ -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)
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue