+import os
from twisted.trial import unittest
from twisted.internet import defer, reactor
from twisted.application import service
from allmydata import client, queen
-import os
+from allmydata.util import idlib
from foolscap.eventual import flushEventualQueue
from twisted.python import log
from twisted.web.client import getPage
"I didn't see the right 'connected peers' message "
"in: %s" % page
)
+ expected = "My nodeid: <span>%s</span>" % idlib.b2a(self.clients[0].nodeid)
+ self.failUnless(expected in page,
+ "I didn't see the right 'My nodeid' message "
+ "in: %s" % page)
d.addCallback(_got_welcome)
d.addCallback(lambda res: getPage(base + "vdrive/subdir1"))
def _got_subdir1(page):
<h2>Mesh Status</h2>
+<div>My nodeid: <span n:render="string" n:data="my_nodeid" /></div>
<div>Queen: <span n:render="string" n:data="queen_pburl" /></div>
<div>Connected to queen?: <span n:render="string" n:data="connected_to_queen" /></div>
<div>Known+Connected Peers: <span n:render="string" n:data="num_peers" /></div>
addSlash = True
docFactory = getxmlfile("welcome.xhtml")
+ def data_my_nodeid(self, ctx, data):
+ return idlib.b2a(IClient(ctx).nodeid)
def data_queen_pburl(self, ctx, data):
return IClient(ctx).introducer_furl
def data_connected_to_queen(self, ctx, data):