36
36
>>> cookingexample = new.module('cookingexample')
37
>>> sys.modules['canonical.lazr.cookingexample'] = cookingexample
37
>>> sys.modules['lp.app.cookingexample'] = cookingexample
39
39
>>> cookingexample.ICookbook = ICookbook
40
40
>>> cookingexample.IRecipe = IRecipe
77
77
# assigned to the _last_obj_traversed attribute.
79
79
>>> from lp.services.webapp import canonical_url
80
>>> from canonical.lazr.testing.menus import make_fake_request
80
>>> from lp.testing.menu import make_fake_request
82
82
>>> root = Root('', None)
83
83
>>> cookbook = Cookbook('joy-of-cooking', root)
158
158
... <includeOverrides
159
159
... package="lp.services.webapp" file="meta-overrides.zcml" />
160
160
... <browser:defaultView
161
... for="canonical.lazr.cookingexample.IRecipe"
161
... for="lp.app.cookingexample.IRecipe"
162
162
... name="+index"
164
164
... <browser:page
165
165
... name="+index"
166
... for="canonical.lazr.cookingexample.IRecipe"
166
... for="lp.app.cookingexample.IRecipe"
167
167
... facet="cookery"
168
... class="canonical.lazr.cookingexample.RecipeIndexView"
168
... class="lp.app.cookingexample.RecipeIndexView"
169
169
... permission="zope.Public"
171
171
... <browser:page
172
172
... name="+edit-instructions"
173
... for="canonical.lazr.cookingexample.IRecipe"
173
... for="lp.app.cookingexample.IRecipe"
174
174
... facet="cookery"
175
... class="canonical.lazr.cookingexample.RecipeEditInstructionsView"
175
... class="lp.app.cookingexample.RecipeEditInstructionsView"
176
176
... permission="zope.Public"
178
178
... <browser:page
179
179
... name="+edit-ingredients"
180
... for="canonical.lazr.cookingexample.IRecipe"
180
... for="lp.app.cookingexample.IRecipe"
181
181
... facet="cookery"
182
... class="canonical.lazr.cookingexample.RecipeEditIngredientsView"
182
... class="lp.app.cookingexample.RecipeEditIngredientsView"
183
183
... permission="zope.Public"
185
185
... <browser:page
186
186
... name="+read-journal"
187
... for="canonical.lazr.cookingexample.IRecipe"
187
... for="lp.app.cookingexample.IRecipe"
188
188
... facet="cookery"
189
... class="canonical.lazr.cookingexample.RecipeReadJournalView"
189
... class="lp.app.cookingexample.RecipeReadJournalView"
190
190
... permission="zope.Public"
192
192
... <browser:page
193
193
... name="+questions"
194
... for="canonical.lazr.cookingexample.IRecipe"
194
... for="lp.app.cookingexample.IRecipe"
195
195
... facet="questions"
196
... class="canonical.lazr.cookingexample.RecipeQuestionsAllView"
196
... class="lp.app.cookingexample.RecipeQuestionsAllView"
197
197
... permission="zope.Public"
590
590
... <configure xmlns:browser="http://namespaces.zope.org/browser">
591
591
... <include file="lib/lp/services/webapp/meta.zcml" />
592
592
... <browser:menus
593
... module="canonical.lazr.cookingexample"
593
... module="lp.app.cookingexample"
595
595
... CookeryFacetMenu RecipeFacetMenu
596
596
... RecipeMenu RecipeEditMenu RecipeJournalMenu RecipeQuestionsMenu"
931
931
>>> from zope.interface import classImplements
932
932
>>> from zope.traversing.adapters import DefaultTraversable
933
933
>>> from zope.traversing.interfaces import IPathAdapter, ITraversable
934
>>> from canonical.lazr.testing.menus import summarise_tal_links
934
>>> from lp.testing.menu import summarise_tal_links
935
935
>>> from lp.app.browser.tales import MenuAPI
936
936
>>> from lp.testing import test_tales
1221
1221
>>> from zope.testing.cleanup import cleanUp
1223
1223
>>> del cookingexample
1224
>>> cooking_module = 'canonical.lazr.cookingexample'
1224
>>> cooking_module = 'lp.app.cookingexample'
1225
1225
>>> for key in sys.modules[cooking_module].__dict__:
1226
1226
... if key.startswith('_') and not key.startswith('__'):
1227
1227
... sys.modules[cooking_module].__dict__[key] = None
1229
1229
... if key != '__builtins__':
1230
1230
... sys.modules[cooking_module].__dict__[key] = None
1231
1231
>>> sys.modules[cooking_module] = None
1232
>>> del sys.modules['canonical.lazr.cookingexample']
1232
>>> del sys.modules['lp.app.cookingexample']