'L{ftp.BaseFTPRealm} calls its C{getHomeDirectory} method with the
avatarId being requested to determine the home directory for that
avatar.'

def test_getHomeDirectory(self):

    result = filepath.FilePath(self.mktemp())
    avatars = []
    class TestRealm(ftp.BaseFTPRealm, ):
        def getHomeDirectory(self, avatarId):
            avatars.append(avatarId)
            return result
    realm = TestRealm(self.mktemp())
    (iface, avatar, logout) = realm.requestAvatar('alice@example.com', None, ftp.IFTPShell)
    self.assertIsInstance(avatar, ftp.FTPShell)
    self.assertEqual(avatar.filesystemRoot, result)
