Exemple #1
0
 def test_encoding(self):
     # For the curious reader, it says:
     #   :Southern-liver!gö[email protected] PRIVMSG :Tards over the Eastern Lake
     #   train eagle spotting.
     self.conn.send_cmd(Mask.from_string(u"Söderbo!göran@söder.se"),
                        "PRIVMSG",
                        (u"Åbäken över Östersjön övar örnåskådning.",))
     self.assert_sent(":S\xc3\xb6derbo!g\xc3\xb6ran@s\xc3\xb6der.se "
                      "PRIVMSG "
                      ":\xc3\x85b\xc3\xa4ken \xc3\xb6ver \xc3\x96stersj"
                      "\xc3\xb6n \xc3\xb6var \xc3\xb6rn\xc3\xa5sk"
                      "\xc3\xa5dning.\r\n")
Exemple #2
0
 def test_io_dispatch(self):
     self.conn.recv_cmd(None, "PING", ("Hello!",))
     self.assert_sent("PONG Hello!\r\n")
     self.conn.recv_cmd(Mask.from_string("some.server"), "PING", ())
     self.assert_sent("PONG\r\n")
Exemple #3
0
 def test_io(self):
     self.conn.send_cmd(None, "HI", ())
     self.assert_sent("HI\r\n")
     self.conn.send_cmd(Mask.from_string("a!b@c"), "TEST", ("foo", "br bz"))
     self.assert_sent(":a!b@c TEST foo :br bz\r\n")