Skip to content

Commit

Permalink
grokcore.layout should not depend on grokcore.formlib. Move the compo…
Browse files Browse the repository at this point in the history
…nents that mix these all up to grok, fix up the remaining tests
  • Loading branch information
janwijbrand committed May 1, 2012
1 parent cea06cc commit 4ec837a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
13 changes: 3 additions & 10 deletions src/grokcore/layout/tests/ftesting.zcml
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:grok="http://namespaces.zope.org/grok">

xmlns="http://namespaces.zope.org/zope"
xmlns:grok="http://namespaces.zope.org/grok">
<include package="zope.component" file="meta.zcml" />
<include package="zope.security" file="meta.zcml" />

<include package="zope.annotation" />
<include package="zope.security" />
<include package="grokcore.layout" />

<include package="grokcore.layout" />
<grok:grok package=".layout" />
<grok:grok package=".models" />

<!-- In order to test the errorviews that stem from zope.errorview. -->
<include package="zope.errorview.tests" file="ftesting.zcml"/>

<!-- We do not grok the other packages on purpose -->

</configure>
4 changes: 3 additions & 1 deletion src/grokcore/layout/tests/layout/layoutlayers.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ def render(self):
return "B Layout"


class MyView(Page):
class MyViewA(Page):
grok.context(Interface)
grok.name('myview')
grok.layer(IDefaultLayer)

def render(self):
Expand All @@ -78,6 +79,7 @@ def render(self):

class MyViewB(Page):
grok.context(Interface)
grok.name('myview')
grok.layer(IAnotherLayer)

def render(self):
Expand Down
2 changes: 1 addition & 1 deletion src/grokcore/layout/tests/test_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ def suiteFromPackage(name):

def test_suite():
suite = unittest.TestSuite()
for name in ['layout', 'models', 'errors']:
for name in ['layout', 'errors']:
suite.addTest(suiteFromPackage(name))
return suite

0 comments on commit 4ec837a

Please sign in to comment.