Example #1
0
 def test_repr(self):
     obj = Mock(name='cb')
     self.assertIn(
         'promise',
         repr(utils.ChannelPromise(obj)),
     )
     self.assertFalse(obj.called)
Example #2
0
 def test_repr(self):
     self.assertIn(
         'foo',
         repr(utils.ChannelPromise(lambda: 'foo')),
     )
 def test_repr(self):
     self.assertEqual(
         repr(utils.ChannelPromise(lambda: 'foo')),
         "<promise: 'foo'>",
     )