Last change
on this file since 3665 was
3510,
checked in by potar, 12 years ago
|
Merged sitemap_date branch into trunk
|
-
Property svn:eol-style set to
native
|
File size:
992 bytes
|
Rev | Line | |
---|
[2946] | 1 | import unittest |
---|
| 2 | import doctest |
---|
| 3 | |
---|
[3163] | 4 | from base import FunctionalTestCase |
---|
| 5 | from Testing import ZopeTestCase as ztc |
---|
[2946] | 6 | from Products.CMFPlone.utils import _createObjectByType |
---|
| 7 | |
---|
[3152] | 8 | |
---|
[2946] | 9 | class DocTestCase(FunctionalTestCase): |
---|
| 10 | |
---|
| 11 | def afterSetUp(self): |
---|
[2994] | 12 | super(DocTestCase, self).afterSetUp() |
---|
[2946] | 13 | #self.createTestContent() |
---|
| 14 | |
---|
| 15 | def addDocument(self, cont, id, text): |
---|
| 16 | doc = _createObjectByType('Document', cont, id=id) |
---|
| 17 | doc.edit(text_format='plain', text=text) |
---|
| 18 | self.workflow.doActionFor(doc, 'publish') |
---|
[3152] | 19 | #return doc |
---|
[2946] | 20 | |
---|
[3152] | 21 | |
---|
[2946] | 22 | def test_suite(): |
---|
| 23 | return unittest.TestSuite([ |
---|
| 24 | |
---|
| 25 | # Demonstrate the main content types |
---|
| 26 | ztc.FunctionalDocFileSuite( |
---|
| 27 | 'filters.txt', package='quintagroup.plonegooglesitemaps', |
---|
| 28 | test_class=DocTestCase, globs=globals(), |
---|
[3152] | 29 | optionflags=doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS), |
---|
[3510] | 30 | # | doctest.REPORT_ONLY_FIRST_FAILURE | |
---|
| 31 | ]) |
---|
[2946] | 32 | |
---|
| 33 | if __name__ == '__main__': |
---|
| 34 | unittest.main(defaultTest='test_suite') |
---|
Note: See
TracBrowser
for help on using the repository browser.