call_function_test: Fix assumption that we run as a script
This commit is contained in:
parent
0dcaeb21a2
commit
a22294dda9
|
@ -64,7 +64,10 @@ class CallFunctionTest(testlib.RouterMixin, testlib.TestCase):
|
|||
def test_bad_return_value(self):
|
||||
exc = self.assertRaises(mitogen.core.StreamError,
|
||||
lambda: self.local.call(func_with_bad_return_value))
|
||||
self.assertEquals(exc[0], "cannot unpickle '__main__'/'CrazyType'")
|
||||
self.assertEquals(
|
||||
exc[0],
|
||||
"cannot unpickle '%s'/'CrazyType'" % (__name__,),
|
||||
)
|
||||
|
||||
def test_returns_dead(self):
|
||||
self.assertEqual(mitogen.core._DEAD, self.local.call(func_returns_dead))
|
||||
|
|
Loading…
Reference in New Issue