diff options
Diffstat (limited to 'test/test_ureports_html.py')
-rw-r--r-- | test/test_ureports_html.py | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/test/test_ureports_html.py b/test/test_ureports_html.py index 2298eec..16300c9 100644 --- a/test/test_ureports_html.py +++ b/test/test_ureports_html.py @@ -15,31 +15,31 @@ # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see <http://www.gnu.org/licenses/>. -'''unit tests for ureports.html_writer -''' +"""unit tests for ureports.html_writer +""" from utils import WriterTC from logilab.common.testlib import TestCase, unittest_main from logilab.common.ureports.html_writer import * -class HTMLWriterTC(TestCase, WriterTC): +class HTMLWriterTC(TestCase, WriterTC): def setUp(self): self.writer = HTMLWriter(1) # Section tests ########################################################### - section_base = '''<div> + section_base = """<div> <h1>Section title</h1> <p>Section\'s description. Blabla bla</p></div> -''' - section_nested = '''<div>\n<h1>Section title</h1>\n<p>Section\'s description.\nBlabla bla</p><div>\n<h2>Subsection</h2>\n<p>Sub section description</p></div>\n</div>\n''' +""" + section_nested = """<div>\n<h1>Section title</h1>\n<p>Section\'s description.\nBlabla bla</p><div>\n<h2>Subsection</h2>\n<p>Sub section description</p></div>\n</div>\n""" # List tests ############################################################## - list_base = '''<ul>\n<li>item1</li>\n<li>item2</li>\n<li>item3</li>\n<li>item4</li>\n</ul>\n''' + list_base = """<ul>\n<li>item1</li>\n<li>item2</li>\n<li>item3</li>\n<li>item4</li>\n</ul>\n""" - nested_list = '''<ul> + nested_list = """<ul> <li><p>blabla<ul> <li>1</li> <li>2</li> @@ -48,16 +48,16 @@ Blabla bla</p></div> </p></li> <li>an other point</li> </ul> -''' +""" # Table tests ############################################################# - table_base = '''<table>\n<tr class="odd">\n<td>head1</td>\n<td>head2</td>\n</tr>\n<tr class="even">\n<td>cell1</td>\n<td>cell2</td>\n</tr>\n</table>\n''' - field_table = '''<table class="field" id="mytable">\n<tr class="odd">\n<td>f1</td>\n<td>v1</td>\n</tr>\n<tr class="even">\n<td>f22</td>\n<td>v22</td>\n</tr>\n<tr class="odd">\n<td>f333</td>\n<td>v333</td>\n</tr>\n</table>\n''' - advanced_table = '''<table class="whatever" id="mytable">\n<tr class="header">\n<th>field</th>\n<th>value</th>\n</tr>\n<tr class="even">\n<td>f1</td>\n<td>v1</td>\n</tr>\n<tr class="odd">\n<td>f22</td>\n<td>v22</td>\n</tr>\n<tr class="even">\n<td>f333</td>\n<td>v333</td>\n</tr>\n<tr class="odd">\n<td> <a href="http://www.perdu.com">toi perdu ?</a></td>\n<td> </td>\n</tr>\n</table>\n''' - + table_base = """<table>\n<tr class="odd">\n<td>head1</td>\n<td>head2</td>\n</tr>\n<tr class="even">\n<td>cell1</td>\n<td>cell2</td>\n</tr>\n</table>\n""" + field_table = """<table class="field" id="mytable">\n<tr class="odd">\n<td>f1</td>\n<td>v1</td>\n</tr>\n<tr class="even">\n<td>f22</td>\n<td>v22</td>\n</tr>\n<tr class="odd">\n<td>f333</td>\n<td>v333</td>\n</tr>\n</table>\n""" + advanced_table = """<table class="whatever" id="mytable">\n<tr class="header">\n<th>field</th>\n<th>value</th>\n</tr>\n<tr class="even">\n<td>f1</td>\n<td>v1</td>\n</tr>\n<tr class="odd">\n<td>f22</td>\n<td>v22</td>\n</tr>\n<tr class="even">\n<td>f333</td>\n<td>v333</td>\n</tr>\n<tr class="odd">\n<td> <a href="http://www.perdu.com">toi perdu ?</a></td>\n<td> </td>\n</tr>\n</table>\n""" # VerbatimText tests ###################################################### - verbatim_base = '''<pre>blablabla</pre>''' + verbatim_base = """<pre>blablabla</pre>""" + -if __name__ == '__main__': +if __name__ == "__main__": unittest_main() |