3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-25 04:02:45 +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,9 +67,9 @@ testconf = {'bot':
'realname': 'PyLink Service Client',
'loglevel': 'DEBUG',
},
'server':
'servers':
{'unittest':
{
'netname': 'fakeirc',
'ip': '0.0.0.0',
'port': 7000,
'recvpass': "abcd",
@ -79,6 +79,7 @@ testconf = {'bot':
'sid': "9PY",
'channels': ["#pylink"],
},
},
}
class FakeIRC(main.Irc):

View File

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

View File

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