Пример #1
0
    def test_report_table_has_headers(self):
        report = TestReport()

        html = djreports_tags.report_table(report)

        self.assertIn('<th>Name</th>', html)
        self.assertIn('<th>Age</th>', html)
        self.assertIn('<th>DOB</th>', html)
Пример #2
0
    def test_report_table_has_data(self):
        report = TestReport()

        html = djreports_tags.report_table(report)

        self.assertIn('<td>Grant</td>', html)
        self.assertIn('<td>24</td>', html)
        self.assertIn('<td>11/6/1991</td>', html)
        self.assertIn('<td>Erica</td>', html)
        self.assertIn('<td>23</td>', html)
        self.assertIn('<td>12/30/1991</td>', html)