Last change
on this file since 3152 was
3152,
checked in by zidane, 13 years ago
|
fixes pep8
|
-
Property svn:eol-style set to
native
|
File size:
954 bytes
|
Rev | Line | |
---|
[2946] | 1 | import unittest |
---|
| 2 | import doctest |
---|
| 3 | |
---|
| 4 | from base import * |
---|
| 5 | from Products.CMFPlone.utils import _createObjectByType |
---|
| 6 | |
---|
[3152] | 7 | |
---|
[2946] | 8 | class DocTestCase(FunctionalTestCase): |
---|
| 9 | |
---|
| 10 | def afterSetUp(self): |
---|
[2994] | 11 | super(DocTestCase, self).afterSetUp() |
---|
[2946] | 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') |
---|
[3152] | 18 | #return doc |
---|
[2946] | 19 | |
---|
[3152] | 20 | |
---|
[2946] | 21 | def 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(), |
---|
[3152] | 28 | optionflags=doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS), |
---|
[2953] | 29 | # | doctest.REPORT_ONLY_FIRST_FAILURE | |
---|
[2946] | 30 | ]) |
---|
| 31 | |
---|
| 32 | if __name__ == '__main__': |
---|
| 33 | unittest.main(defaultTest='test_suite') |
---|
Note: See
TracBrowser
for help on using the repository browser.