2010-10-06 17:12:11 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
"""Functional Doctests for plone.app.discussion.
|
2010-09-28 18:35:45 +02:00
|
|
|
|
2010-10-06 17:12:11 +02:00
|
|
|
These test are only triggered when Plone 4 (and plone.testing) is installed.
|
|
|
|
"""
|
2015-05-03 08:41:56 +02:00
|
|
|
from plone.app.discussion.testing import PLONE_APP_DISCUSSION_FUNCTIONAL_TESTING # noqa
|
2011-04-22 16:59:59 +02:00
|
|
|
from plone.testing import layered
|
|
|
|
|
2015-05-03 08:16:39 +02:00
|
|
|
import doctest
|
|
|
|
import pprint
|
|
|
|
import unittest2 as unittest
|
2010-12-16 00:52:56 +01:00
|
|
|
|
2010-09-28 18:35:45 +02:00
|
|
|
|
2012-01-14 07:03:29 +01:00
|
|
|
optionflags = (
|
2013-04-17 19:07:40 +02:00
|
|
|
doctest.ELLIPSIS |
|
|
|
|
doctest.NORMALIZE_WHITESPACE |
|
|
|
|
doctest.REPORT_ONLY_FIRST_FAILURE
|
|
|
|
)
|
2010-09-28 18:35:45 +02:00
|
|
|
normal_testfiles = [
|
2010-10-06 15:52:11 +02:00
|
|
|
'functional_test_comments.txt',
|
2012-11-14 13:25:10 +01:00
|
|
|
'functional_test_comment_review_workflow.txt',
|
2010-09-28 18:35:45 +02:00
|
|
|
]
|
|
|
|
|
2012-01-14 07:03:29 +01:00
|
|
|
|
2011-04-22 16:59:59 +02:00
|
|
|
def test_suite():
|
|
|
|
suite = unittest.TestSuite()
|
|
|
|
suite.addTests([
|
2012-01-14 07:03:29 +01:00
|
|
|
layered(doctest.DocFileSuite(test,
|
2011-04-22 16:59:59 +02:00
|
|
|
optionflags=optionflags,
|
|
|
|
globs={'pprint': pprint.pprint,
|
|
|
|
}
|
|
|
|
),
|
|
|
|
layer=PLONE_APP_DISCUSSION_FUNCTIONAL_TESTING)
|
|
|
|
for test in normal_testfiles])
|
|
|
|
return suite
|