5
__copyright__ = 'this file is in the public domain'
7
from gozerbot.ircevent import Ircevent
8
from gozerbot.bot import Bot
9
from gozerbot.generic import getwho
10
from gozerbot.config import config
13
class test_ipv6(unittest.TestCase):
16
def test_ipv6_userhost(self):
17
ii = Ircevent().parse(self.b, ':qqa!~qqa@2001:888:1218:2180:0:0:0:aaaf \
18
PRIVMSG #bartbot :bla')
19
self.assertEqual(ii.userhost, 'qqa@2001:888:1218:2180:0:0:0:aaaf')
21
def test_ipv6_getwho(self):
22
self.b.fakein(':localhost 311 bartbot dunk ~bart \
23
2001:888:1218:2180:0:0:0:aaaf * :bart')
24
a = getwho(self.b, 'dunk')
25
self.assertEqual(a, 'bart@2001:888:1218:2180:0:0:0:aaaf')
27
def test_ipv6_getwho2(self):
28
self.b.fakein(':localhost 311 bartbot dunk ~bart ::aaaf * :bart')
29
a = getwho(self.b, 'dunk')
30
self.assertEqual(a, 'bart@::aaaf')