From 02ead7794791f2dabbdbad08d484936d05a8508e Mon Sep 17 00:00:00 2001 From: Stephan Richter Date: Wed, 20 Feb 2013 23:57:18 -0500 Subject: Remove various testing dependencies, which breaks some circular dependencies. --- src/zope/traversing/browser/configure.zcml | 21 ++++++--- src/zope/traversing/tests/ftesting.zcml | 28 +++++++---- src/zope/traversing/tests/test_vhosting.py | 76 +++++++++++++++++++++++------- 3 files changed, 90 insertions(+), 35 deletions(-) (limited to 'src') diff --git a/src/zope/traversing/browser/configure.zcml b/src/zope/traversing/browser/configure.zcml index 9e6c0cc..197d0fe 100644 --- a/src/zope/traversing/browser/configure.zcml +++ b/src/zope/traversing/browser/configure.zcml @@ -3,7 +3,6 @@ xmlns:browser="http://namespaces.zope.org/browser"> - - - + + + + + + + + diff --git a/src/zope/traversing/tests/ftesting.zcml b/src/zope/traversing/tests/ftesting.zcml index a97174d..139a1e5 100644 --- a/src/zope/traversing/tests/ftesting.zcml +++ b/src/zope/traversing/tests/ftesting.zcml @@ -5,7 +5,6 @@ package="zope.traversing" > - @@ -18,24 +17,33 @@ - - + + + + - + + + + + ') + self.addPage('/pt', u'request/URL') self.verify('/pt', 'http://localhost/pt/index.html') self.verify('/++vh++/++/pt', 'http://localhost/pt/index.html') @@ -129,7 +169,7 @@ class TestVirtualHosting(unittest.TestCase): self.verify('/++vh++https:localhost:443/fake/folders/++/pt', 'https://localhost/fake/folders/pt/index.html') - self.addPage('/foo/bar/pt', u'') + self.addPage('/foo/bar/pt', u'request/URL') self.verify('/foo/bar/pt', 'http://localhost/foo/bar/pt/index.html') self.verify('/foo/bar/++vh++/++/pt', 'http://localhost/pt/index.html') @@ -147,7 +187,7 @@ class TestVirtualHosting(unittest.TestCase): 'https://localhost/bar/index.html') def test_absolute_url(self): - self.addPage('/pt', u'') + self.addPage('/pt', u'context/@@absolute_url') self.verify('/pt', 'http://localhost') self.verify('/++vh++/++/pt', 'http://localhost') @@ -157,7 +197,7 @@ class TestVirtualHosting(unittest.TestCase): 'https://localhost/fake/folders') self.addPage('/foo/bar/pt', - u'') + u'context/@@absolute_url') self.verify('/foo/bar/pt', 'http://localhost/foo/bar') self.verify('/foo/bar/++vh++/++/pt', 'http://localhost') @@ -169,7 +209,7 @@ class TestVirtualHosting(unittest.TestCase): def test_absolute_url_absolute_traverse(self): self.createObject('/foo/bar/obj', MyObj()) self.addPage('/foo/bar/pt', - u'') + u'container/obj/pt/@@absolute_url') self.verify('/foo/bar/pt', 'http://localhost/foo/bar/pt') self.verify('/foo/++vh++https:localhost:443/++/bar/pt', 'https://localhost/bar/pt') @@ -180,7 +220,7 @@ class TestVirtualHosting(unittest.TestCase): if Resource not in _checkers: defineChecker(Resource, NamesChecker(['__call__'])) self.addPage(u'/foo/bar/pt', - u'') + u'context/++resource++quux') self.verify(u'/foo/bar/pt', u'http://localhost/@@/quux') self.verify(u'/foo/++vh++https:localhost:443/fake/folders/++/bar/pt', u'https://localhost/fake/folders/@@/quux') @@ -207,8 +247,7 @@ class TestVirtualHosting(unittest.TestCase): transaction.commit() def addPage(self, path, content): - page = MyPageTemplate() - page.pt_edit(content, 'text/html') + page = MyTalesPage(content) self.createObject(path, page) def verify(self, path, content): @@ -254,6 +293,7 @@ class DummyPublication: view = queryMultiAdapter((ob, request), name=name) if view is None: from zope.publisher.interfaces import NotFound + import pdb; pdb.set_trace() raise NotFound(ob, name) return view else: -- cgit v1.2.1