#NEWLINE# def testBasic( self ) : #NEWLINE# #INDENT# '\n        Test basic operations.\n\n        Setup an XMPPClientFactory, which sets up an XMPPAuthenticator, and let\n        it produce a protocol instance. Then inspect the instance variables of\n        the authenticator and XML stream objects.\n        ' #NEWLINE# self . client_jid = jid . JID ( 'user@example.com/resource' ) #NEWLINE# xs = client . XMPPClientFactory ( self . client_jid , 'secret' ) . buildProtocol ( None ) #NEWLINE# self . assertEqual ( 'example.com' , xs . authenticator . otherHost ) #NEWLINE# self . assertEqual ( self . client_jid , bind . authenticator . jid ) #NEWLINE# self . assertEqual ( 'secret' , xs . authenticator . password ) #NEWLINE# ( version , tls , sasl , bind , session ) = xs . initializers #NEWLINE# self . assert_ ( isinstance ( tls , xmlstream . TLSInitiatingInitializer ) ) #NEWLINE# self . assert_ ( isinstance ( sasl , SASLInitiatingInitializer ) ) #NEWLINE# self . assert_ ( isinstance ( bind , client . BindInitializer ) ) #NEWLINE# self . assert_ ( isinstance ( session , client . SessionInitializer ) ) #NEWLINE# self . assertFalse ( tls . required ) #NEWLINE# self . assertTrue ( sasl . required ) #NEWLINE# self . assertFalse ( bind . required ) #NEWLINE# self . assertFalse ( session . required )