3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-25 12:12:53 +01:00

tests/: update for new multi-net config format

This commit is contained in:
James Lu 2015-07-09 18:42:38 -07:00
parent 652d53c29e
commit ffec80ee45
3 changed files with 14 additions and 13 deletions

View File

@ -67,17 +67,18 @@ testconf = {'bot':
'realname': 'PyLink Service Client', 'realname': 'PyLink Service Client',
'loglevel': 'DEBUG', 'loglevel': 'DEBUG',
}, },
'server': 'servers':
{ {'unittest':
'netname': 'fakeirc', {
'ip': '0.0.0.0', 'ip': '0.0.0.0',
'port': 7000, 'port': 7000,
'recvpass': "abcd", 'recvpass': "abcd",
'sendpass': "abcd", 'sendpass': "abcd",
'protocol': "null", 'protocol': "null",
'hostname': "pylink.unittest", 'hostname': "pylink.unittest",
'sid': "9PY", 'sid': "9PY",
'channels': ["#pylink"], 'channels': ["#pylink"],
},
}, },
} }

View File

@ -9,7 +9,7 @@ import unittest
# Yes, we're going to even test the testing classes. Testception? I think so. # Yes, we're going to even test the testing classes. Testception? I think so.
class TestFakeIRC(unittest.TestCase): class TestFakeIRC(unittest.TestCase):
def setUp(self): def setUp(self):
self.irc = classes.FakeIRC(classes.FakeProto(), classes.testconf) self.irc = classes.FakeIRC('unittest', classes.FakeProto(), classes.testconf)
def testFakeIRC(self): def testFakeIRC(self):
self.irc.run('this should do nothing') self.irc.run('this should do nothing')

View File

@ -11,7 +11,7 @@ import utils
class TestProtoInspIRCd(unittest.TestCase): class TestProtoInspIRCd(unittest.TestCase):
def setUp(self): def setUp(self):
self.irc = classes.FakeIRC(inspircd, classes.testconf) self.irc = classes.FakeIRC('unittest', inspircd, classes.testconf)
self.proto = self.irc.proto self.proto = self.irc.proto
self.sdata = self.irc.serverdata self.sdata = self.irc.serverdata
# This is to initialize ourself as an internal PseudoServer, so we can spawn clients # This is to initialize ourself as an internal PseudoServer, so we can spawn clients