Beispiel #1
0
 def test_missing(self):
     line = irctokens.format("PRIVMSG", ["#channel", "hello"])
     self.assertEqual(line, "PRIVMSG #channel hello")
Beispiel #2
0
 def test(self):
     line = irctokens.format("PRIVMSG", ["#channel", "hello"],
         tags={"id": "\\" + " " + ";" + "\r\n"})
     self.assertEqual(line, r"@id=\\\s\:\r\n PRIVMSG #channel hello")
Beispiel #3
0
 def test_no_space(self):
     line = irctokens.format("PRIVMSG", ["#channel", "helloworld"])
     self.assertEqual(line, "PRIVMSG #channel helloworld")
Beispiel #4
0
 def test_lowercase(self):
     line = irctokens.format("privmsg")
     self.assertEqual(line, "PRIVMSG")
Beispiel #5
0
 def test(self):
     line = irctokens.format("PRIVMSG", ["#channel", "hello"],
         source="nick!user@host")
     self.assertEqual(line, ":nick!user@host PRIVMSG #channel hello")
Beispiel #6
0
 def test_empty_value(self):
     line = irctokens.format("PRIVMSG", ["#channel", "hello"],
         tags={"a": ""})
     self.assertEqual(line, "@a PRIVMSG #channel hello")