source: products/quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/tests/test_doctest.py @ 3152

Last change on this file since 3152 was 3152, checked in by zidane, 9 years ago

fixes pep8

  • Property svn:eol-style set to native
File size: 954 bytes
Line 
1import unittest
2import doctest
3
4from base import *
5from Products.CMFPlone.utils import _createObjectByType
6
7
8class DocTestCase(FunctionalTestCase):
9
10    def afterSetUp(self):
11        super(DocTestCase, self).afterSetUp()
12        #self.createTestContent()
13
14    def addDocument(self, cont, id, text):
15        doc = _createObjectByType('Document', cont, id=id)
16        doc.edit(text_format='plain', text=text)
17        self.workflow.doActionFor(doc, 'publish')
18        #return doc
19
20
21def test_suite():
22    return unittest.TestSuite([
23
24        # Demonstrate the main content types
25        ztc.FunctionalDocFileSuite(
26            'filters.txt', package='quintagroup.plonegooglesitemaps',
27            test_class=DocTestCase, globs=globals(),
28            optionflags=doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS),
29                       # | doctest.REPORT_ONLY_FIRST_FAILURE |
30        ])
31
32if __name__ == '__main__':
33    unittest.main(defaultTest='test_suite')
Note: See TracBrowser for help on using the repository browser.