twisted.words.service.IRCFactory

Here are the examples of the python api twisted.words.service.IRCFactory taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

Example 1

Project: SubliminalCollaborator Source File: test_irc_service.py
    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)

Example 2

Project: SubliminalCollaborator Source File: twisted_words.py
Function: get_factory
    def getFactory(cls, realm, portal):
        from twisted.words import service
        return service.IRCFactory(realm, portal)