Adjust unittest for master -> parent split
Tests should now match changes in
4d31300dd0
This commit is contained in:
parent
9ccff0f5d1
commit
4fb1b928b7
|
@ -1,10 +1,10 @@
|
|||
|
||||
import mitogen.core
|
||||
import mitogen.master
|
||||
import mitogen.parent
|
||||
|
||||
|
||||
@mitogen.core.takes_econtext
|
||||
def allocate_an_id(econtext):
|
||||
mitogen.master.upgrade_router(econtext)
|
||||
mitogen.parent.upgrade_router(econtext)
|
||||
return econtext.router.allocate_id()
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import subprocess
|
|||
|
||||
import unittest2
|
||||
|
||||
import mitogen.master
|
||||
import mitogen.parent
|
||||
import testlib
|
||||
|
||||
|
||||
|
@ -17,7 +17,7 @@ class CommandLineTest(testlib.RouterMixin, testlib.TestCase):
|
|||
# * 3.x starting 2.7
|
||||
|
||||
def test_valid_syntax(self):
|
||||
stream = mitogen.master.Stream(self.router, 0)
|
||||
stream = mitogen.parent.Stream(self.router, 0)
|
||||
args = stream.get_boot_command()
|
||||
|
||||
# Executing the boot command will print "EC0" and expect to read from
|
||||
|
|
|
@ -6,6 +6,7 @@ import unittest2
|
|||
|
||||
import testlib
|
||||
import mitogen.master
|
||||
import mitogen.parent
|
||||
|
||||
|
||||
class ScanCodeImportsTest(unittest2.TestCase):
|
||||
|
@ -19,11 +20,12 @@ class ScanCodeImportsTest(unittest2.TestCase):
|
|||
(-1, 'unittest2', ()),
|
||||
(-1, 'testlib', ()),
|
||||
(-1, 'mitogen.master', ()),
|
||||
(-1, 'mitogen.parent', ()),
|
||||
])
|
||||
|
||||
|
||||
class IterReadTest(unittest2.TestCase):
|
||||
func = staticmethod(mitogen.master.iter_read)
|
||||
func = staticmethod(mitogen.parent.iter_read)
|
||||
|
||||
def make_proc(self):
|
||||
args = [testlib.data_path('iter_read_generator.sh')]
|
||||
|
@ -75,7 +77,7 @@ class IterReadTest(unittest2.TestCase):
|
|||
|
||||
|
||||
class WriteAllTest(unittest2.TestCase):
|
||||
func = staticmethod(mitogen.master.write_all)
|
||||
func = staticmethod(mitogen.parent.write_all)
|
||||
|
||||
def make_proc(self):
|
||||
args = [testlib.data_path('write_all_consumer.sh')]
|
||||
|
|
Loading…
Reference in New Issue