Commit 6bdb0226 authored by Hanno Schlichting's avatar Hanno Schlichting

Break testing dependency on zope.app.testing.

parent 22b2ded0
......@@ -5,6 +5,8 @@ CHANGES
3.10.0 (Unreleased)
-------------------
- Break testing dependency on zope.app.testing.
- Break testing dependency on zope.app.dependable by moving the code and tests
into that package.
......
......@@ -63,8 +63,9 @@ setup(name='zope.container',
], include_dirs=['include']),
],
extras_require=dict(
test=['zope.copypastemove',
'zope.app.testing',
test=['zope.configuration',
'zope.copypastemove',
'zope.security',
]),
install_requires=['setuptools',
'zope.interface',
......
......@@ -84,7 +84,7 @@
<adapter
for="zope.container.interfaces.ISimpleReadContainer
zope.publisher.interfaces.browser.IBrowserRequest"
zope.publisher.interfaces.browser.IBrowserRequest"
provides="zope.publisher.interfaces.browser.IBrowserPublisher"
factory="zope.container.traversal.ItemTraverser"
permission="zope.Public"
......
import os
import unittest
from zope.configuration.xmlconfig import XMLConfig
from zope.interface import implements
import zope.component
from zope.app.testing import functional
from zope.publisher.browser import TestRequest
from zope.publisher.interfaces.browser import IBrowserPublisher
from zope.container.traversal import ItemTraverser
ContainerLayer = functional.ZCMLLayer(
os.path.join(os.path.dirname(__file__), 'ftest_zcml_dependencies.zcml'),
__name__, 'ContainerLayer', allow_teardown=True)
from zope.container.interfaces import IItemContainer
from zope.container.interfaces import ISimpleReadContainer
from zope.container.traversal import ItemTraverser
from zope.container.testing import ContainerPlacelessSetup
class ZCMLDependencies(functional.BrowserTestCase):
class ZCMLDependencies(ContainerPlacelessSetup, unittest.TestCase):
def test_zcml_can_load_with_only_zope_component_meta(self):
# this is just an example. It is supposed to show that the
# configure.zcml file has loaded successfully.
import zope.component
XMLConfig('meta.zcml', zope.component)()
import zope.security
XMLConfig('meta.zcml', zope.security)()
XMLConfig('permissions.zcml', zope.security)()
import zope.container
XMLConfig('configure.zcml', zope.container)()
request = TestRequest()
class SampleItemContainer(object):
......@@ -45,7 +49,6 @@ class ZCMLDependencies(functional.BrowserTestCase):
def test_suite():
suite = unittest.TestSuite()
ZCMLDependencies.layer = ContainerLayer
suite.addTest(unittest.makeSuite(ZCMLDependencies))
return suite
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment