Пример #1
0
 def test_names_reply(self):
     s = StateDouble()
     c = NamesResponder(s)
     s.channels["#test"].join((1,6), "o")
     s.channels["#test"].join((3,2), "v")
     c.callback_names((3,6), (1, None), ["#test"])
     self.assertEquals(
         [
             ((1,None), "353", (3,6), ["=", "#test", "+test @localtest"]),
             ((1,None), "366", (3,6), ["#test", "End of /NAMES list."])
         ],
         s.insight)
Пример #2
0
 def test_names_reply_if_relevant(self):
     s = StateDouble()
     c = NamesResponder(s)
     c.callback_names((7,6), (2, None), ["#test"])
     self.assertEquals([], s.insight)