def test_stats_page(self): self.mock_login() response = self.get('/ag_stats/') self.assertEqual(response.code, 200) stats = db.getAGStats() for item, stat in stats: stat = '' if stat is None else stat self.assertIn('%s</td><td>%s' % (item, stat), response.body)
def get(self): stats = db.getAGStats() for item, stat in stats: stat = '' if stat is None else stat self.render("ag_stats.html", stats=stats, loginerror='')