def test_statistic(self): stat = Statistic('Test', keys=['foo', 'bar'], description='Statistic Example') stat.add([1, 2]) self.assertEqual(stat.slug(), 'Test') table = stat.render_rows() self.assertEqual(table, '<tr><th>foo</th><th>bar</th></tr>\n<tr><td>1</td><td>2</td></tr>\n')