safe.common.test.test_tables module

InaSAFE Disaster risk assessment tool developed by AusAid -
Table Tests implementation.

Contact : ole.moller.nielsen@gmail.com

Note

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

class safe.common.test.test_tables.TablesTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

Test the SAFE Table

html = '<!DOCTYPE html>\n<html lang="en">\n <head>\n <meta charset="utf-8">\n <title>InaSAFE</title>\n <meta name="description" content="">\n <meta name="author" content="">\n <link href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" rel="stylesheet">\n <style>\n caption.caption-bottom\n {\n caption-side:bottom;\n }\n </style>\n </head>\n <body>\n <h2>Test Output</h2>\n'
setUp()[source]

Fixture run before all tests

tearDown()[source]

Fixture run after each test

test_cell_header()[source]

Test we can make a cell as a <th> element

Test cell links work

test_col_span()[source]

Testing column spanning

test_column()[source]

Test to retrieve all element in a column.

test_nested_table_in_cell()[source]

Test nested table in cell

test_row_from_string()[source]

Test row from string - it should span to the table width too

test_row_span()[source]

Testing row spanning

test_simple_table()[source]

Test simple table creation

test_table_by_rows()[source]

Test table from infividual rows

test_table_caption()[source]

Test table caption

test_table_cells()[source]

Test table from individual cells

test_table_from_string()[source]

Test table from string - should be a single cell in a single row

test_table_with_colalign()[source]

Table columns can be right justified

test_table_with_header()[source]

Test html render of a table with header row(s).

tmpDir()[source]

Helper to get os temp dir.

Args: None

Returns: str Absolute filesystem path to temp dir.

Raises: None

tmp_dir = None
writeHtml(name)[source]