Ignore:
Timestamp:
Aug 12, 2011, 2:11:43 PM (9 years ago)
Author:
Ralph Meijer <ralphm@…>
Branch:
wokkel-muc-client-support-24
Message:

Use generic.Request for room destruction request, add TestableStreamManager?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wokkel/test/helpers.py

    r96 r147  
    66"""
    77
    8 from twisted.internet import defer
     8from twisted.internet import defer, task
    99from twisted.words.xish import xpath
    1010from twisted.words.xish.utility import EventDispatcher
    1111
    1212from wokkel.generic import parseXml
     13from wokkel.subprotocols import StreamManager
    1314
    1415class XmlStreamStub(object):
     
    9394
    9495        return d
     96
     97
     98class TestableStreamManager(StreamManager):
     99    """
     100    Stream manager for testing subprotocol handlers.
     101    """
     102
     103    def __init__(self, reactor=None):
     104        class DummyFactory(object):
     105            def addBootstrap(self, event, fn):
     106                pass
     107
     108        factory = DummyFactory()
     109        StreamManager.__init__(self, factory, reactor)
     110        self.stub = XmlStreamStub()
     111        self._connected(self.stub.xmlstream)
     112        self._authd(self.stub.xmlstream)
Note: See TracChangeset for help on using the changeset viewer.