Skip to content

Commit

Permalink
Add integration doc test framework
Browse files Browse the repository at this point in the history
  • Loading branch information
smcmahon committed May 13, 2011
1 parent 32159ef commit 289035d
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 5 deletions.
27 changes: 27 additions & 0 deletions collective/dexterity_class/IntegrationTests.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Integration Tests

>>> portal
<PloneSite at /plone>

>>> portal_name
'plone'

>>> folder
<ATFolder at /plone/Members/test_user_1_>

>>> user_name
'test_user_1_'

>>> user_password
'secret'

>>> user_role
'test_role_1_'

>>> app.REQUEST
<HTTPRequest, URL=http://nohost>

>>> app
<Application at >


14 changes: 9 additions & 5 deletions collective/dexterity_class/tests.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import doctest
import unittest

#from zope.testing import doctestunit
#from zope.component import testing
from Testing import ZopeTestCase as ztc

from Products.Five import fiveconfigure
Expand All @@ -11,6 +10,9 @@

import collective.dexterity_class

OPTION_FLAGS = doctest.NORMALIZE_WHITESPACE | \
doctest.ELLIPSIS


class TestCase(ptc.PloneTestCase):

Expand Down Expand Up @@ -41,9 +43,11 @@ def test_suite():


# Integration tests that use PloneTestCase
#ztc.ZopeDocFileSuite(
# 'README.txt', package='collective.dexterity_class',
# test_class=TestCase),
ztc.ZopeDocFileSuite(
'IntegrationTests.txt',
package='collective.dexterity_class',
optionflags=OPTION_FLAGS,
test_class=TestCase),

#ztc.FunctionalDocFileSuite(
# 'browser.txt', package='collective.dexterity_class',
Expand Down

0 comments on commit 289035d

Please sign in to comment.