'Logging in with correct derived credentials and an interface
that the portal\'s realm supports works.'

def test_derivedInterface(self):

    login = self.successResultOf(self.portal.login(DerivedCredentials('bob', 'hello'), self, ITestable))
    (iface, impl, logout) = login
    self.assertEqual(iface, ITestable)
    self.assertTrue(iface.providedBy(impl), ('%s    does    not    implement    %s' % (impl, iface)))
    self.assertTrue(impl.original.loggedIn)
    self.assertTrue((not impl.original.loggedOut))
    logout()
    self.assertTrue(impl.original.loggedOut)
