예제 #1
0
 def test_parse_in_url(self):
     line = ":[email protected] PRIVMSG #test :https://botbot.me"
     prefix, command, args = croxy.parse_in(line)
     self.assertEqual(prefix, "[email protected]")
     self.assertEqual(command, "PRIVMSG")
     self.assertEqual(args, ["#test", "https://botbot.me"])
예제 #2
0
 def test_parse_in_list(self):
     line = ":oxygen.oftc.net 322 graham_king #linode 412 :Linode Community Support | http://www.linode.com/ | Linodes in Asia-Pacific! - http://bit.ly/ooBzhV"
     prefix, command, args = croxy.parse_in(line)
     self.assertEqual(prefix, "oxygen.oftc.net")
     self.assertEqual(command, "322")
예제 #3
0
 def test_parse_in_away(self):
     line = ":hybrid7.debian.local 301 graham_king graham :Not here"
     prefix, command, args = croxy.parse_in(line)
     self.assertEqual(prefix, "hybrid7.debian.local")
     self.assertEqual(command, "301")
     self.assertEqual(args, ["graham_king", "graham", "Not here"])
예제 #4
0
 def test_parse_in_andbang(self):
     line = ":[email protected] PRIVMSG #ab :hello @graham"
     prefix, command, args = croxy.parse_in(line)
     self.assertEqual(prefix, "[email protected]")
     self.assertEqual(command, "PRIVMSG")
     self.assertEqual(args, ["#ab", "hello @graham"])
예제 #5
0
 def test_parse_in_privmsg(self):
     line = ":[email protected] PRIVMSG #linode :totally"
     prefix, command, args = croxy.parse_in(line)
     self.assertEqual(prefix, "[email protected]")
     self.assertEqual(command, "PRIVMSG")
     self.assertEqual(args, ["#linode", "totally"])
예제 #6
0
 def test_parse_in_welcome(self):
     line = ":barjavel.freenode.net 001 graham_king :Welcome to the freenode Internet Relay Chat Network graham_king"
     prefix, command, args = croxy.parse_in(line)
     self.assertEqual(prefix, "barjavel.freenode.net")
     self.assertEqual(command, "001")
     self.assertEqual(args, ["graham_king", "Welcome to the freenode Internet Relay Chat Network graham_king"])