def test_append_row__implicit_body(self): table = Table() row = TableRow() table.append_row(row) assert_equal([ b"<table>", b"<tbody>", b"<tr>", b"</tr>", b"</tbody>", b"</table>" ], list(iter(table)))
def test_append_header_row__implicit_head(self): table = Table() row = TableRow() table.append_header_row(row) assert_equal([ b"<table>", b"<thead>", b"<tr>", b"</tr>", b"</thead>", b"</table>" ], list(iter(table)))
def test_create_header_cells_return_value(self): row = TableRow() cells = row.create_header_cells("Cell 1", "Cell 2") assert_equal(2, len(cells))
def test_create_header_cells(self): row = TableRow() row.create_header_cells("Cell 1", "Cell 2") assert_equal('<tr><th>Cell 1</th><th>Cell 2</th></tr>', str(row))
def test_create_header_cell(self): row = TableRow() cell1 = row.create_header_cell() cell1.append("Cell 1") row.create_header_cell("Cell 2") assert_equal("<tr><th>Cell 1</th><th>Cell 2</th></tr>", str(row))
def generate_rows(self): yield TableRow()
def generate_header_rows(self): yield TableRow()
def test_create_cells(self): row = TableRow() row.create_cells("Cell 1", "Cell 2") assert_equal("<tr><td>Cell 1</td><td>Cell 2</td></tr>", str(row))