2010-10-06 17:12:11 +02:00
|
|
|
"""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.
|
|
|
|
"""
|
2022-05-02 00:39:34 +02:00
|
|
|
from ..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
|
2017-05-08 09:24:38 +02:00
|
|
|
import 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 = (
|
2022-05-01 23:14:09 +02:00
|
|
|
doctest.ELLIPSIS | doctest.NORMALIZE_WHITESPACE | doctest.REPORT_ONLY_FIRST_FAILURE
|
2013-04-17 19:07:40 +02:00
|
|
|
)
|
2010-09-28 18:35:45 +02:00
|
|
|
normal_testfiles = [
|
2022-05-01 23:14:09 +02:00
|
|
|
"functional_test_comments.txt",
|
|
|
|
"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()
|
2022-05-01 23:14:09 +02:00
|
|
|
suite.addTests(
|
|
|
|
[
|
|
|
|
layered(
|
|
|
|
doctest.DocFileSuite(
|
|
|
|
test,
|
|
|
|
optionflags=optionflags,
|
|
|
|
globs={
|
|
|
|
"pprint": pprint.pprint,
|
|
|
|
},
|
|
|
|
),
|
|
|
|
layer=PLONE_APP_DISCUSSION_FUNCTIONAL_TESTING,
|
|
|
|
)
|
|
|
|
for test in normal_testfiles
|
|
|
|
]
|
|
|
|
)
|
2011-04-22 16:59:59 +02:00
|
|
|
return suite
|