source: products/quintagroup.plonegooglesitemaps/branches/blacklist/quintagroup/plonegooglesitemaps/tests/test_doctest.py @ 2994

Last change on this file since 2994 was 2994, checked in by mylan, 13 years ago

#228: Fix doctest testcase

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