Exemplo n.º 1
0
 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)))
Exemplo n.º 2
0
 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)))
Exemplo n.º 3
0
 def test_create_header_cells_return_value(self):
     row = TableRow()
     cells = row.create_header_cells("Cell 1", "Cell 2")
     assert_equal(2, len(cells))
Exemplo n.º 4
0
 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))
Exemplo n.º 5
0
 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))
Exemplo n.º 6
0
 def test_create_header_cells_return_value(self):
     row = TableRow()
     cells = row.create_header_cells("Cell 1", "Cell 2")
     assert_equal(2, len(cells))
Exemplo n.º 7
0
 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))
Exemplo n.º 8
0
 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))
Exemplo n.º 9
0
 def generate_rows(self):
     yield TableRow()
Exemplo n.º 10
0
 def generate_header_rows(self):
     yield TableRow()
Exemplo n.º 11
0
 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))