testOOoStyle.py 23.8 KB
Newer Older
1
# -*- coding: utf-8 -*-
2 3
##############################################################################
#
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
# Copyright (c) 2007 Nexedi SA and Contributors. All Rights Reserved.
#          Jerome Perrin <jerome@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# 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.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################

30
import io
31
import unittest
32
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
33
from Products.ERP5Type.tests.utils import DummyLocalizer
34
from Products.ERP5Form.Selection import Selection
35 36
from Testing import ZopeTestCase
from Products.ERP5OOo.tests.utils import Validator
37
import httplib
38 39
import lxml.html
import PyPDF2
40

41
HTTP_OK = httplib.OK
42

43 44
# setting this to True allows the .publish() calls to provide tracebacks
debug = False
45 46 47 48 49 50 51

class TestOOoStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
  """Tests ODF styles for ERP5."""
  skin = None
  content_type = None

  def getBusinessTemplateList(self):
52 53
    return ('erp5_core_proxy_field_legacy', 'erp5_ui_test', 'erp5_base',
            'erp5_ods_style', 'erp5_odt_style',)
54 55 56 57

  def afterSetUp(self):
    if not self.skin:
      raise NotImplementedError('Subclasses must define skin')
58

59 60 61 62 63
    gender = self.portal.portal_categories.gender
    if 'male' not in gender.objectIds():
      gender.newContent(id='male')
      self.portal.portal_caches.clearAllCache()

64 65
    self.auth = 'ERP5TypeTestCase:'
    person_module = self.portal.person_module
66
    if person_module._getOb('pers', None) is None:
67
      person_module.newContent(id='pers', portal_type='Person')
68
      self.tic()
69
    person_module.pers.setFirstName('Bob')
70 71 72
    person_module.pers.setGender(None)
    person_module.pers.setCareerRole(None)

73
    if person_module.pers._getOb('img', None) is None:
74
      person_module.pers.newContent(portal_type='Embedded File', id='img')
75 76 77 78 79 80

    if person_module._getOb('pers_without_image', None) is None:
      person = person_module.newContent(
                              portal_type='Person',
                              id = 'pers_without_image',
                              first_name = 'Test')
81
      self.tic()
82

83 84
    self.portal.changeSkin(self.skin)
    self.validator = Validator()
85
    # make sure selections are empty
86 87
    name = 'person_module_selection'
    self.portal.portal_selections.setSelectionFor(name, Selection(name))
88

89 90
  def publish(self, *args, **kw):
    kw['handle_errors'] = not debug
91
    return super(TestOOoStyle, self).publish(*args, **kw)
92 93 94 95 96

  def _validate(self, odf_file_data):
    error_list = self.validator.validate(odf_file_data)
    if error_list:
      self.fail(''.join(error_list))
97

98
  def _assertFieldInGroup(self, field_type, form_id, group):
99
    for f in getattr(self.portal, form_id).get_fields_in_group(group):
100 101 102 103 104 105 106
      if f.meta_type == 'ProxyField':
        if f.getRecursiveTemplateField().meta_type == field_type:
          break
      if f.meta_type == field_type:
        break
    else:
      self.fail('No %s found in %s (%s group)' % (field_type, form_id, group))
107 108 109 110 111

  def test_skin_selection(self):
    self.assertTrue(self.skin in
              self.portal.portal_skins.getSkinSelections())

112 113 114 115
  def test_form_list(self):
    response = self.publish(
                   '/%s/person_module/PersonModule_viewPersonList'
                    % self.portal.getId(), self.auth)
116
    self.assertEqual(HTTP_OK, response.getStatus())
117 118 119
    content_type = response.getHeader('content-type')
    self.assertTrue(content_type.startswith(self.content_type), content_type)
    content_disposition = response.getHeader('content-disposition')
120
    self.assertEqual('attachment', content_disposition.split(';')[0])
121 122
    self._validate(response.getBody())

123
  def test_form_list_domain_tree(self):
124 125 126
    self.portal.portal_selections.setListboxDisplayMode(
                  self.portal.REQUEST, 'DomainTreeMode',
                  'person_module_selection')
127 128 129 130 131 132
    # XXX no proper API on selection / selection tool for this ?
    self.portal.portal_selections.setSelectionParamsFor(
                  selection_name='person_module_selection',
                  params=dict(domain_path='portal_categories',
                              domain_url='group',
                              domain_list=()))
133 134 135
    response = self.publish(
                   '/%s/person_module/PersonModule_viewPersonList'
                    % self.portal.getId(), self.auth)
136
    self.assertEqual(HTTP_OK, response.getStatus())
137 138 139
    content_type = response.getHeader('content-type')
    self.assertTrue(content_type.startswith(self.content_type), content_type)
    content_disposition = response.getHeader('content-disposition')
140
    self.assertEqual('attachment', content_disposition.split(';')[0])
141 142 143
    self._validate(response.getBody())

  def test_form_view(self):
144 145 146 147 148
    # form_view on a form without listbox
    self.portal.person_module.pers.setDefaultAddressZipCode(59000)
    response = self.publish(
        '/%s/person_module/pers/default_address/GeographicAddress_view'
        % self.portal.getId(), self.auth)
149
    self.assertEqual(HTTP_OK, response.getStatus())
150 151 152
    content_type = response.getHeader('content-type')
    self.assertTrue(content_type.startswith(self.content_type), content_type)
    content_disposition = response.getHeader('content-disposition')
153
    self.assertEqual('attachment', content_disposition.split(';')[0])
154 155 156 157 158 159 160 161 162
    self._validate(response.getBody())

  def test_form_view_empty_listbox(self):
    # form_view on a form with an empty listbox
    if hasattr(self.portal.person_module.pers, 'default_address'):
      self.portal.person_module.pers._delObject('default_address')
    response = self.publish(
                   '/%s/person_module/pers/Person_view'
                   % self.portal.getId(), self.auth)
163
    self.assertEqual(HTTP_OK, response.getStatus())
164 165 166
    content_type = response.getHeader('content-type')
    self.assertTrue(content_type.startswith(self.content_type), content_type)
    content_disposition = response.getHeader('content-disposition')
167
    self.assertEqual('attachment', content_disposition.split(';')[0])
168 169 170 171
    self._validate(response.getBody())

  def test_form_view_non_empty_listbox(self):
    self.portal.person_module.pers.setDefaultAddressZipCode(59000)
172 173 174
    response = self.publish(
                   '/%s/person_module/pers/Person_view'
                   % self.portal.getId(), self.auth)
175
    self.assertEqual(HTTP_OK, response.getStatus())
176 177 178
    content_type = response.getHeader('content-type')
    self.assertTrue(content_type.startswith(self.content_type), content_type)
    content_disposition = response.getHeader('content-disposition')
179
    self.assertEqual('attachment', content_disposition.split(';')[0])
180 181
    self._validate(response.getBody())

182
  def test_form_view_empty_format(self):
183
    # empty format= does not use oood for conversion
184 185 186
    response = self.publish(
                   '/%s/person_module/pers/Person_view?format='
                   % self.portal.getId(), self.auth)
187
    self.assertEqual(HTTP_OK, response.getStatus())
188 189 190
    content_type = response.getHeader('content-type')
    self.assertTrue(content_type.startswith(self.content_type), content_type)
    content_disposition = response.getHeader('content-disposition')
191
    self.assertEqual('attachment', content_disposition.split(';')[0])
192
    self._validate(response.getBody())
193 194

  def test_form_view_pdf_format(self):
195 196 197 198
    # format=pdf uses oood for conversion
    response = self.publish(
                   '/%s/person_module/pers/Person_view?format=pdf'
                   % self.portal.getId(), self.auth)
199
    self.assertEqual(HTTP_OK, response.getStatus())
200
    content_type = response.getHeader('content-type')
201
    self.assertEqual(content_type, 'application/pdf')
202
    content_disposition = response.getHeader('content-disposition')
203
    self.assertEqual('attachment', content_disposition.split(';')[0])
204

205 206 207 208 209 210 211 212 213 214 215
  def test_form_view_html_format(self):
    # format=html is rendered inline
    response = self.publish(
                   '/%s/person_module/pers/Person_view?format=html'
                   % self.portal.getId(), self.auth)
    self.assertEqual(HTTP_OK, response.getStatus())
    content_type = response.getHeader('content-type')
    self.assertEqual(content_type, 'text/html; charset=utf-8')
    content_disposition = response.getHeader('content-disposition')
    self.assertEqual('inline', content_disposition.split(';')[0])

216 217
  def test_report_view_form_view(self):
    # Test report view rendering forms using form_view
218
    self.assertEqual('form_view', self.portal.Base_viewWorkflowHistory.pt)
219 220 221
    response = self.publish(
                   '/%s/person_module/pers/Base_viewHistory'
                    % self.portal.getId(), self.auth)
222
    self.assertEqual(HTTP_OK, response.getStatus())
223 224 225
    content_type = response.getHeader('content-type')
    self.assertTrue(content_type.startswith(self.content_type), content_type)
    content_disposition = response.getHeader('content-disposition')
226
    self.assertEqual('attachment', content_disposition.split(';')[0])
227 228
    self._validate(response.getBody())

229 230 231 232 233 234 235 236 237 238 239
  def test_report_view_form_list(self):
    # Test report view rendering forms using form_list
    self.portal.Base_viewWorkflowHistory.pt = 'form_list'
    try:
      # publish commits a transaction, so we have to restore the original page
      # template on the form
      response = self.publish(
                   '/%s/person_module/pers/Base_viewHistory'
                    % self.portal.getId(), self.auth)
    finally:
      self.portal.Base_viewWorkflowHistory.pt = 'form_view'
240
      self.commit()
241
    self.assertEqual(HTTP_OK, response.getStatus())
242 243 244
    content_type = response.getHeader('content-type')
    self.assertTrue(content_type.startswith(self.content_type), content_type)
    content_disposition = response.getHeader('content-disposition')
245
    self.assertEqual('attachment', content_disposition.split(';')[0])
246 247 248
    self._validate(response.getBody())


249 250 251 252
  def test_report_view_landscape(self):
    response = self.publish(
       '/%s/person_module/pers/Base_viewHistory?landscape=1'
        % self.portal.getId(), self.auth)
253
    self.assertEqual(HTTP_OK, response.getStatus())
254 255 256
    content_type = response.getHeader('content-type')
    self.assertTrue(content_type.startswith(self.content_type), content_type)
    content_disposition = response.getHeader('content-disposition')
257
    self.assertEqual('attachment', content_disposition.split(';')[0])
258 259 260 261 262 263
    self._validate(response.getBody())

  def test_report_view_sheet_per_report_section(self):
    response = self.publish(
       '/%s/person_module/pers/Base_viewHistory?sheet_per_report_section=1'
        % self.portal.getId(), self.auth)
264
    self.assertEqual(HTTP_OK, response.getStatus())
265 266 267
    content_type = response.getHeader('content-type')
    self.assertTrue(content_type.startswith(self.content_type), content_type)
    content_disposition = response.getHeader('content-disposition')
268
    self.assertEqual('attachment', content_disposition.split(';')[0])
269 270
    self._validate(response.getBody())

271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321
  def test_report_view_report_section_title(self):
    response = self.publish(
       '/%s/foo_module/FooModule_viewHierarchyTestReport'
        % self.portal.getId(), self.auth)
    self.assertEqual(HTTP_OK, response.getStatus())
    content_type = response.getHeader('content-type')
    self.assertTrue(content_type.startswith(self.content_type), content_type)
    self._validate(response.getBody())

    # check the hierarchy is properly kept ...
    if self.skin == 'ODT':
      # ... in pdf
      response = self.publish(
         '/%s/foo_module/FooModule_viewHierarchyTestReport?format=pdf'
          % self.portal.getId(), self.auth)
      pdf = PyPDF2.PdfFileReader(io.BytesIO(response.getBody()))

      def getOutlineTitles(outlines):
        for outline in outlines:
          if isinstance(outline, list):
            yield list(getOutlineTitles(outline))
          else:
            yield outline['/Title']
      self.assertEqual(
          list(getOutlineTitles(pdf.getOutlines())),
          [
              "1. First",
              [
                  "1.1 First / First",
                  "1.2 First / Second",
                  ["1.2.1 First / Second / First"],
              ],
              "2. Second",
          ],
      )

      # ..and in html
      response = self.publish(
         '/%s/foo_module/FooModule_viewHierarchyTestReport?format=html'
          % self.portal.getId(), self.auth)
      tree = lxml.html.fromstring(response.getBody())
      self.assertEqual(
          [node.text for node in tree.findall('.//h1')],
          ['1. First', '2. Second'])
      self.assertEqual(
          [node.text for node in tree.findall('.//h2')],
          ['1.1 First / First', '1.2 First / Second'])
      self.assertEqual(
          [node.text for node in tree.findall('.//h3')],
          ['1.2.1 First / Second / First'])

322 323 324 325
  def test_form_view_encoding(self):
    self.portal.person_module.pers.setFirstName('Jérome')
    response = self.publish('/%s/person_module/pers/Person_view'
                          % self.portal.getId(), basic=self.auth)
326
    self.assertEqual(HTTP_OK, response.getStatus())
327 328 329
    content_type = response.getHeader('content-type')
    self.assertTrue(content_type.startswith(self.content_type), content_type)
    content_disposition = response.getHeader('content-disposition')
330
    self.assertEqual('attachment', content_disposition.split(';')[0])
331 332
    self._validate(response.getBody())

333 334 335 336 337 338 339 340 341 342 343 344
  def test_control_character_encoding(self):
    # XML does not allow certain control characters
    self.portal.person_module.pers.setFirstName('This character: \x14 is not allowed in XML')
    response = self.publish('/%s/person_module/pers/Person_view'
                          % self.portal.getId(), basic=self.auth)
    self.assertEqual(HTTP_OK, response.getStatus())
    content_type = response.getHeader('content-type')
    self.assertTrue(content_type.startswith(self.content_type), content_type)
    content_disposition = response.getHeader('content-disposition')
    self.assertEqual('attachment', content_disposition.split(';')[0])
    self._validate(response.getBody())

345 346 347 348
  def test_form_view_category(self):
    self.portal.person_module.pers.setGender('male')
    response = self.publish('/%s/person_module/pers/Person_view'
                          % self.portal.getId(), basic=self.auth)
349
    self.assertEqual(HTTP_OK, response.getStatus())
350 351 352
    content_type = response.getHeader('content-type')
    self.assertTrue(content_type.startswith(self.content_type), content_type)
    content_disposition = response.getHeader('content-disposition')
353
    self.assertEqual('attachment', content_disposition.split(';')[0])
354 355 356 357 358 359 360
    self._validate(response.getBody())

  def test_form_view_broken_category(self):
    self.portal.person_module.pers.setGender('not exist')
    self.portal.person_module.pers.setCareerRole('not exist')
    response = self.publish('/%s/person_module/pers/Person_view'
                          % self.portal.getId(), basic=self.auth)
361
    self.assertEqual(HTTP_OK, response.getStatus())
362 363 364
    content_type = response.getHeader('content-type')
    self.assertTrue(content_type.startswith(self.content_type), content_type)
    content_disposition = response.getHeader('content-disposition')
365
    self.assertEqual('attachment', content_disposition.split(';')[0])
366 367 368 369 370 371
    self._validate(response.getBody())

  def test_form_view_embedded_image(self):
    # with image
    response = self.publish('/%s/person_module/pers/Person_viewDetails'
                          % self.portal.getId(), basic=self.auth)
372
    self.assertEqual(HTTP_OK, response.getStatus())
373 374 375
    content_type = response.getHeader('content-type')
    self.assertTrue(content_type.startswith(self.content_type), content_type)
    content_disposition = response.getHeader('content-disposition')
376
    self.assertEqual('attachment', content_disposition.split(';')[0])
377 378 379 380
    self._validate(response.getBody())
    # without image
    response = self.publish('/%s/person_module/pers_without_image/Person_viewDetails'
                          % self.portal.getId(), basic=self.auth)
381
    self.assertEqual(HTTP_OK, response.getStatus())
382 383 384
    content_type = response.getHeader('content-type')
    self.assertTrue(content_type.startswith(self.content_type), content_type)
    content_disposition = response.getHeader('content-disposition')
385
    self.assertEqual('attachment', content_disposition.split(';')[0])
386 387 388 389 390 391
    self._validate(response.getBody())

  def test_report_view_encoding(self):
    self.portal.person_module.pers.setFirstName('Jérome')
    response = self.publish('/%s/person_module/pers/Base_viewHistory'
                          % self.portal.getId(), basic=self.auth)
392
    self.assertEqual(HTTP_OK, response.getStatus())
393 394 395
    content_type = response.getHeader('content-type')
    self.assertTrue(content_type.startswith(self.content_type), content_type)
    content_disposition = response.getHeader('content-disposition')
396
    self.assertEqual('attachment', content_disposition.split(';')[0])
397 398 399 400 401 402 403
    self._validate(response.getBody())

  def test_form_list_encoding(self):
    self.portal.person_module.pers.setFirstName('Jérome')
    response = self.publish(
       '/%s/person_module/PersonModule_viewPersonList'
        % self.portal.getId(), basic=self.auth)
404
    self.assertEqual(HTTP_OK, response.getStatus())
405 406 407
    content_type = response.getHeader('content-type')
    self.assertTrue(content_type.startswith(self.content_type), content_type)
    content_disposition = response.getHeader('content-disposition')
408
    self.assertEqual('attachment', content_disposition.split(';')[0])
409 410
    self._validate(response.getBody())

411
  def test_image_field_form_view(self):
412
    self._assertFieldInGroup('ImageField', 'Image_view', 'right')
413 414 415
    response = self.publish(
       '/%s/person_module/pers/img/Image_view'
        % self.portal.getId(), basic=self.auth)
416
    self.assertEqual(HTTP_OK, response.getStatus())
417 418 419
    content_type = response.getHeader('content-type')
    self.assertTrue(content_type.startswith(self.content_type), content_type)
    content_disposition = response.getHeader('content-disposition')
420
    self.assertEqual('attachment', content_disposition.split(';')[0])
421 422 423
    self._validate(response.getBody())

  def test_image_field_form_view_bottom_group(self):
424 425
    self._assertFieldInGroup(
        'ImageField', 'Image_viewFullSizedImage', 'bottom')
426 427 428
    response = self.publish(
       '/%s/person_module/pers/img/Image_viewFullSizedImage'
        % self.portal.getId(), basic=self.auth)
429
    self.assertEqual(HTTP_OK, response.getStatus())
430 431 432
    content_type = response.getHeader('content-type')
    self.assertTrue(content_type.startswith(self.content_type), content_type)
    content_disposition = response.getHeader('content-disposition')
433
    self.assertEqual('attachment', content_disposition.split(';')[0])
434 435
    self._validate(response.getBody())

436 437 438 439 440 441 442 443
  def test_textarea_center_group(self):
    self._assertFieldInGroup('TextAreaField', 'Person_view', 'center')
    self.assert_('my_description' in [f.getId() for f in
        self.portal.Person_view.get_fields_in_group('center')])
    self.portal.person_module.pers.setDescription('<Escape>&\nnewline')
    response = self.publish(
                   '/%s/person_module/pers/Person_view'
                   % self.portal.getId(), self.auth)
444
    self.assertEqual(HTTP_OK, response.getStatus())
445 446 447
    content_type = response.getHeader('content-type')
    self.assertTrue(content_type.startswith(self.content_type), content_type)
    content_disposition = response.getHeader('content-disposition')
448
    self.assertEqual('attachment', content_disposition.split(';')[0])
449 450
    body = response.getBody()
    self._validate(body)
451

452 453 454 455 456 457 458
    if self.skin == 'ODT':
      # Is it good to do this only for ODT ?
      from Products.ERP5OOo.OOoUtils import OOoParser
      parser = OOoParser()
      parser.openFromString(body)
      content_xml = parser.oo_files['content.xml']
      self.assert_('&lt;Escape&gt;&amp;<text:line-break/>newline' in content_xml)
459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475

  def test_untranslatable_columns(self):
    self.portal.ListBoxZuite_reset()
    self.portal.Localizer = DummyLocalizer()
    message_catalog = self.portal.Localizer.erp5_ui
    # XXX odt style does not seem to display a listbox if it is empty ???
    self.portal.foo_module.newContent(portal_type='Foo')
    message = self.id()
    self.portal.FooModule_viewFooList.listbox.ListBox_setPropertyList(
      field_columns = ['do_not_translate | %s' % message,],
      field_untranslatablecolumns = ['do_not_translate | %s' % message,],
    )
    self.tic()
    self.portal.changeSkin(self.skin)
    response = self.publish(
                   '/%s/foo_module/FooModule_viewFooList?portal_skin='
                   % self.portal.getId(), self.auth)
476
    self.assertEqual(HTTP_OK, response.getStatus())
477 478 479
    content_type = response.getHeader('content-type')
    self.assertTrue(content_type.startswith(self.content_type), content_type)
    content_disposition = response.getHeader('content-disposition')
480
    self.assertEqual('attachment', content_disposition.split(';')[0])
481 482 483 484 485 486 487 488 489 490 491 492
    body = response.getBody()
    self._validate(body)

    from Products.ERP5OOo.OOoUtils import OOoParser
    parser = OOoParser()
    parser.openFromString(body)
    content_xml = parser.oo_files['content.xml']
    self.assertTrue(message in content_xml)

    # This untranslatable column have not been translated
    self.assertTrue(message not in message_catalog._translated)

493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522
  def test_form_view_ZMI(self):
    """We can edit form_view in the ZMI."""
    response = self.publish('/%s/form_view/manage_main'
       % self.portal.getId(), self.auth)
    self.assertEqual(HTTP_OK, response.getStatus())
    content_type = response.getHeader('content-type')
    self.assertEquals('text/html;charset=UTF-8', content_type)
    self.assertFalse(response.getHeader('content-disposition'))
    # Simplistic assertion that we are viewing the ODF XML source
    self.assertTrue('office:document-content' in response.getBody())

  def test_form_list_ZMI(self):
    """We can edit form_list in the ZMI."""
    response = self.publish('/%s/form_list/manage_main'
       % self.portal.getId(), self.auth)
    self.assertEqual(HTTP_OK, response.getStatus())
    content_type = response.getHeader('content-type')
    self.assertEquals('text/html;charset=UTF-8', content_type)
    self.assertFalse(response.getHeader('content-disposition'))
    self.assertTrue('office:document-content' in response.getBody())

  def test_report_view_ZMI(self):
    """We can edit report_view in the ZMI."""
    response = self.publish('/%s/report_view/manage_main'
       % self.portal.getId(), self.auth)
    self.assertEqual(HTTP_OK, response.getStatus())
    content_type = response.getHeader('content-type')
    self.assertEquals('text/html;charset=UTF-8', content_type)
    self.assertFalse(response.getHeader('content-disposition'))
    self.assertTrue('office:document-content' in response.getBody())
523 524 525 526 527 528 529 530 531 532 533 534 535 536

class TestODTStyle(TestOOoStyle):
  skin = 'ODT'
  content_type = 'application/vnd.oasis.opendocument.text'


class TestODSStyle(TestOOoStyle):
  skin = 'ODS'
  content_type = 'application/vnd.oasis.opendocument.spreadsheet'


def test_suite():
  suite = unittest.TestSuite()
  suite.addTest(unittest.makeSuite(TestODTStyle))
537
  suite.addTest(unittest.makeSuite(TestODSStyle))
538 539
  return suite