#NEWLINE# def test_derivedInterface( self ) : #NEWLINE# #INDENT# '\n        Login with credentials implementing an interface inheriting from an\n        interface registered with a checker (but not itself registered).\n        ' #NEWLINE# l = [ ] #NEWLINE# f = [ ] #NEWLINE# self . portal . login ( DerivedCredentials ( 'bob' , 'hello' ) , self , ITestable ) . addCallback ( l . append ) . addErrback ( f . append ) #NEWLINE# if f : #NEWLINE# #INDENT# raise f [ 0 ] #NEWLINE# #UNINDENT# ( iface , impl , logout ) = l [ 0 ] #NEWLINE# self . assertEquals ( iface , ITestable ) #NEWLINE# self . failUnless ( iface . providedBy ( impl ) , ( '%s does not implement %s' % ( impl , iface ) ) ) #NEWLINE# self . failUnless ( self . original . loggedIn ) #NEWLINE# self . failUnless ( ( not impl . original . loggedOut ) ) #NEWLINE# logout ( ) #NEWLINE# self . failUnless ( impl . original . loggedOut )