

def test_additional_row_method(self):

    class CustomTable(Table):

        def bar_url(self, item):
            return ['custom_bar']
    table = CustomTable(Foo.objects.all(), ['id', 'bar'], ['bar_url'])
    result = [['ID', 'bar'], [{
        'value': self.foo_1.id,
        'html_attributes': '',
    }, {
        'value': 'Test1',
        'html_attributes': '',
    }], [{
        'value': 'custom_bar',
        'html_attributes': ' colspan="2"',
    }]]
    self.assertListEqual(table.get_table_content(), result)

dataset/ETHPy150Open allegro/ralph/src/ralph/lib/table/tests.py TableRenderTestCase.test_additional_row_method/original