Пример #1
0
 def test_hearTellsClient(self):
     """
     When 'hear' is called on a ChatterElement, it should inform its client of what
     was said and by whom.
     """
     from chatthing.chatterbox import ChatRoom
     cb = ChatRoom().makeChatter()
     heard = []
     cb.callRemote = lambda method, who, what: heard.append((method, who, what))
     cb.hear(u'Hello', u'Chat')
     self.assertEquals(heard, [('displayUserMessage', u'Hello', u'Chat')])