plone.app.discussion/plone/app/discussion/tests/test_functional.py

40 lines
1004 B
Python
Raw Normal View History

"""Functional Doctests for plone.app.discussion.
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
from plone.testing import layered
import doctest
import pprint
import unittest
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
)
normal_testfiles = [
2022-05-01 23:14:09 +02:00
"functional_test_comments.txt",
"functional_test_comment_review_workflow.txt",
]
2012-01-14 07:03:29 +01: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
]
)
return suite