mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-24 15:16:41 +00:00
Just make an assertion against the full value
This commit is contained in:
parent
e3e49632a5
commit
e339130e63
@ -740,12 +740,26 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, testutil.ReallyEqualMixi
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def test_welcome_json(self):
|
def test_welcome_json(self):
|
||||||
|
"""
|
||||||
|
There is a JSON version of the welcome page which can be selected with the
|
||||||
|
``t`` query argument.
|
||||||
|
"""
|
||||||
d = self.GET("/?t=json")
|
d = self.GET("/?t=json")
|
||||||
def _check(res):
|
def _check(res):
|
||||||
decoded = simplejson.loads(res)
|
decoded = simplejson.loads(res)
|
||||||
self.assertIn("other_nodeid", decoded['servers'])
|
expected = {
|
||||||
self.assertIn("introducers", decoded)
|
'introducers': {'statuses': []},
|
||||||
self.assertIn("servers", decoded)
|
'servers': {
|
||||||
|
'other_nodeid': {
|
||||||
|
'available_space': 123456,
|
||||||
|
'connection_status': 'summary',
|
||||||
|
'last_received_data': u'',
|
||||||
|
'nickname': u'other_nickname \u263b',
|
||||||
|
'version': '1.0',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
self.assertEqual(expected, decoded)
|
||||||
d.addCallback(_check)
|
d.addCallback(_check)
|
||||||
return d
|
return d
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user