mirror of
https://github.com/lilydjwg/nvchecker.git
synced 2025-03-10 06:14:02 +00:00
Move global IOLoop hack to helper
This commit is contained in:
parent
f48fdbc441
commit
f1cca7388b
2 changed files with 5 additions and 5 deletions
|
@ -1,8 +1,12 @@
|
||||||
from nvchecker.get_version import get_version
|
from tornado.ioloop import IOLoop
|
||||||
import tornado.testing
|
import tornado.testing
|
||||||
|
from nvchecker.get_version import get_version
|
||||||
|
|
||||||
|
|
||||||
class ExternalVersionTestCase(tornado.testing.AsyncTestCase):
|
class ExternalVersionTestCase(tornado.testing.AsyncTestCase):
|
||||||
|
def get_new_ioloop(self):
|
||||||
|
return IOLoop.instance()
|
||||||
|
|
||||||
def sync_get_version(self, name, config):
|
def sync_get_version(self, name, config):
|
||||||
def get_version_callback(name, version):
|
def get_version_callback(name, version):
|
||||||
self.stop(version)
|
self.stop(version)
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
from tornado.ioloop import IOLoop
|
|
||||||
from tests.helper import ExternalVersionTestCase
|
from tests.helper import ExternalVersionTestCase
|
||||||
|
|
||||||
|
|
||||||
class CMDTest(ExternalVersionTestCase):
|
class CMDTest(ExternalVersionTestCase):
|
||||||
def get_new_ioloop(self):
|
|
||||||
return IOLoop.instance()
|
|
||||||
|
|
||||||
def test_cmd(self):
|
def test_cmd(self):
|
||||||
self.assertEqual(self.sync_get_version("example", {"cmd": "echo Meow"}), "Meow")
|
self.assertEqual(self.sync_get_version("example", {"cmd": "echo Meow"}), "Meow")
|
||||||
|
|
Loading…
Add table
Reference in a new issue