Changeset 72:727b4d29c48e in ralphm-patches for listening-authenticator-stream-features.patch
- Timestamp:
- Jan 27, 2013, 10:40:32 PM (10 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
listening-authenticator-stream-features.patch
r66 r72 1 1 # HG changeset patch 2 # Parent 9393ad83138bbe6ab1c5249a6a115b8e561446222 # Parent 840b96390047670c5209195300f902689c18b12f 3 3 Add FeatureListeningAuthenticator. 4 4 … … 9 9 --- a/wokkel/generic.py 10 10 +++ b/wokkel/generic.py 11 @@ -10, 13 +10,13@@11 @@ -10,7 +10,7 @@ 12 12 from zope.interface import implements 13 13 … … 15 15 -from twisted.python import reflect 16 16 +from twisted.python import log, reflect 17 from twisted.python.deprecate import deprecated 18 from twisted.python.versions import Version 17 19 from twisted.words.protocols.jabber import error, jid, xmlstream 18 from twisted.words.protocols.jabber.xmlstream import toResponse 20 @@ -18,7 +18,7 @@ 19 21 from twisted.words.xish import domish, utility 20 22 from twisted.words.xish.xmlstream import BootstrapMixin … … 25 27 26 28 IQ_GET = '/iq[@type="get"]' 27 @@ -2 5,6 +25,8 @@29 @@ -27,6 +27,8 @@ 28 30 NS_VERSION = 'jabber:iq:version' 29 31 VERSION = IQ_GET + '/query[@xmlns="' + NS_VERSION + '"]' … … 34 36 """ 35 37 Parse serialized XML into a DOM structure. 36 @@ -327,3 +329,287 @@ 37 38 def clientConnectionFailed(self, connector, reason): 39 self.deferred.errback(reason) 40 + 41 + 42 + 38 @@ -332,6 +334,290 @@ 39 40 41 43 42 +class TestableXmlStream(xmlstream.XmlStream): 44 43 + """ … … 322 321 + self._initializers = self.getInitializers() 323 322 + self._initializeStream() 323 + 324 + 325 + 326 @deprecated(Version("Wokkel", 0, 8, 0), "unicode.encode('idna')") 327 def prepareIDNName(name): 328 """ 324 329 diff --git a/wokkel/iwokkel.py b/wokkel/iwokkel.py 325 330 --- a/wokkel/iwokkel.py … … 388 393 --- a/wokkel/test/test_generic.py 389 394 +++ b/wokkel/test/test_generic.py 390 @@ - 5,11 +5,16@@391 Tests for L{wokkel.generic}.392 """395 @@ -7,14 +7,19 @@ 396 397 import re 393 398 394 399 +from zope.interface import verify 395 400 + 396 401 +from twisted.internet import defer 402 from twisted.python import deprecate 403 from twisted.python.versions import Version 397 404 +from twisted.test import proto_helpers 398 405 from twisted.trial import unittest 406 from twisted.trial.util import suppress as SUPPRESS 399 407 from twisted.words.xish import domish 400 408 from twisted.words.protocols.jabber.jid import JID … … 406 414 407 415 NS_VERSION = 'jabber:iq:version' 408 @@ -268,3 +273,331 @@ 409 The default is no timeout. 410 """ 411 self.assertIdentical(None, self.request.timeout) 412 + 413 + 414 + 416 @@ -276,6 +281,334 @@ 417 418 419 415 420 +class BaseReceivingInitializerTest(unittest.TestCase): 416 421 + """ … … 738 743 + 739 744 + self.xmlstream.assertStreamError(self, condition='invalid-namespace') 745 + 746 + 747 + 748 class PrepareIDNNameTests(unittest.TestCase): 749 """ 750 Tests for L{wokkel.generic.prepareIDNName}.
Note: See TracChangeset
for help on using the changeset viewer.