Use BeautifulSoup to check favicon in storage page
This commit is contained in:
parent
56e2fa3f24
commit
1469af0f3b
|
@ -954,8 +954,9 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, testutil.ReallyEqualMixi
|
||||||
def test_storage(self):
|
def test_storage(self):
|
||||||
d = self.GET("/storage")
|
d = self.GET("/storage")
|
||||||
def _check(res):
|
def _check(res):
|
||||||
self.failUnlessIn('Storage Server Status', res)
|
soup = BeautifulSoup(res, 'html5lib')
|
||||||
self.failUnlessIn(FAVICON_MARKUP, res)
|
assert_soup_has_text(self, soup, 'Storage Server Status')
|
||||||
|
assert_soup_has_favicon(self, soup)
|
||||||
res_u = res.decode('utf-8')
|
res_u = res.decode('utf-8')
|
||||||
self.failUnlessIn(u'<li>Server Nickname: <span class="nickname mine">fake_nickname \u263A</span></li>', res_u)
|
self.failUnlessIn(u'<li>Server Nickname: <span class="nickname mine">fake_nickname \u263A</span></li>', res_u)
|
||||||
d.addCallback(_check)
|
d.addCallback(_check)
|
||||||
|
|
Loading…
Reference in New Issue