You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
443 B
Python
17 lines
443 B
Python
7 years ago
|
import unittest
|
||
|
|
||
|
import mitogen.core
|
||
|
import testlib
|
||
|
|
||
|
|
||
|
class ConstructorTest(testlib.RouterMixin, unittest.TestCase):
|
||
|
def test_constructor(self):
|
||
|
# issue 32
|
||
|
l1 = self.router.local()
|
||
|
chan = mitogen.core.Channel(self.router, l1, 123)
|
||
|
assert chan.router == self.router
|
||
|
assert chan.context == l1
|
||
|
assert chan.dst_handle == 123
|
||
|
assert chan.handle is not None
|
||
|
assert chan.handle > 0
|