# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) any # later version. # # logilab-common is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with logilab-common. If not, see . '''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): def setUp(self): self.writer = HTMLWriter(1) # Section tests ########################################################### section_base = '''

Section title

Section\'s description. Blabla bla

''' section_nested = '''
\n

Section title

\n

Section\'s description.\nBlabla bla

\n

Subsection

\n

Sub section description

\n
\n''' # List tests ############################################################## list_base = '''\n''' nested_list = ''' ''' # Table tests ############################################################# table_base = '''\n\n\n\n\n\n\n\n\n
head1head2
cell1cell2
\n''' field_table = '''\n\n\n\n\n\n\n\n\n\n\n\n\n
f1v1
f22v22
f333v333
\n''' advanced_table = '''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
fieldvalue
f1v1
f22v22
f333v333
toi perdu ? 
\n''' # VerbatimText tests ###################################################### verbatim_base = '''
blablabla
''' if __name__ == '__main__': unittest_main()