2017-09-29 10:34:09 +00:00
|
|
|
|
|
|
|
import os
|
2017-11-11 22:59:38 +00:00
|
|
|
|
2017-11-12 12:42:27 +00:00
|
|
|
import unittest2
|
2017-09-29 10:34:09 +00:00
|
|
|
|
|
|
|
import mitogen
|
|
|
|
import mitogen.ssh
|
|
|
|
import mitogen.utils
|
|
|
|
|
|
|
|
import testlib
|
|
|
|
import plain_old_module
|
|
|
|
|
|
|
|
|
2017-11-12 12:42:27 +00:00
|
|
|
class LocalTest(testlib.RouterMixin, unittest2.TestCase):
|
2017-09-29 10:34:09 +00:00
|
|
|
stream_class = mitogen.ssh.Stream
|
|
|
|
|
|
|
|
def test_stream_name(self):
|
|
|
|
context = self.router.local()
|
|
|
|
pid = context.call(os.getpid)
|
|
|
|
self.assertEquals('local.%d' % (pid,), context.name)
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
2017-11-12 12:42:27 +00:00
|
|
|
unittest2.main()
|