2017-09-16 10:06:08 +00:00
|
|
|
import os
|
2017-11-11 22:59:38 +00:00
|
|
|
|
2017-11-12 12:42:27 +00:00
|
|
|
import unittest2
|
2017-09-16 10:06:08 +00:00
|
|
|
|
2017-10-02 08:26:02 +00:00
|
|
|
import testlib
|
2017-09-16 10:06:08 +00:00
|
|
|
|
|
|
|
|
2017-10-02 08:26:02 +00:00
|
|
|
class NestedTest(testlib.RouterMixin, testlib.TestCase):
|
|
|
|
def test_nested(self):
|
|
|
|
context = None
|
|
|
|
for x in range(1, 11):
|
|
|
|
context = self.router.local(via=context, name='local%d' % x)
|
2017-09-16 10:06:08 +00:00
|
|
|
|
2017-10-02 08:26:02 +00:00
|
|
|
pid = context.call(os.getpid)
|
2017-11-11 23:08:08 +00:00
|
|
|
self.assertIsInstance(pid, int)
|
2017-10-02 08:26:02 +00:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
2017-11-12 12:42:27 +00:00
|
|
|
unittest2.main()
|