def setUp(self):
     """
     Sets up a Realm, Portal, Factory, IRCUser, Transport, and Connection
     for our tests.
     """
     self.wordsRealm = InMemoryWordsRealm("example.com")
     self.portal = portal.Portal(self.wordsRealm,
         [checkers.InMemoryUsernamePasswordDatabaseDontUse(john="pass")])
     self.factory = IRCFactory(self.wordsRealm, self.portal)
     self.ircUser = self.factory.buildProtocol(None)
     self.stringTransport = proto_helpers.StringTransport()
     self.ircUser.makeConnection(self.stringTransport)
예제 #2
0
 def __init__(self):
     self.realm = InMemoryWordsRealm("example.com")
     self.mockedCodes = []