#NEWLINE# def test_disallowedRegisterProducer( self ) : #NEWLINE# #INDENT# '\n        L{StringTransport.registerProducer} raises L{RuntimeError} if a\n        producer is already registered.\n        ' #NEWLINE# producer = object ( ) #NEWLINE# self . transport . registerProducer ( producer , True ) #NEWLINE# self . assertRaises ( RuntimeError , self . transport . registerProducer , object ( ) , False ) #NEWLINE# self . assertIdentical ( self . transport . producer , producer ) #NEWLINE# self . assertTrue ( self . transport . streaming )