Last change
on this file 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 | |
---|
1 | import unittest |
---|
2 | import doctest |
---|
3 | |
---|
4 | from base import * |
---|
5 | from Products.CMFPlone.utils import _createObjectByType |
---|
6 | |
---|
7 | class 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 | |
---|
19 | def 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 | |
---|
30 | if __name__ == '__main__': |
---|
31 | unittest.main(defaultTest='test_suite') |
---|
Note: See
TracBrowser
for help on using the repository browser.