~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/app/doc/menus.txt

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-12-31 00:26:32 UTC
  • mfrom: (14606.4.19 apocaremains-2)
  • Revision ID: launchpad@pqm.canonical.com-20111231002632-67fafhhz150cct3b
[r=wgrant][no-qa] Explode canonical.lazr.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
    >>> import new
35
35
    >>> import sys
36
36
    >>> cookingexample = new.module('cookingexample')
37
 
    >>> sys.modules['canonical.lazr.cookingexample'] = cookingexample
 
37
    >>> sys.modules['lp.app.cookingexample'] = cookingexample
38
38
 
39
39
    >>> cookingexample.ICookbook = ICookbook
40
40
    >>> cookingexample.IRecipe = IRecipe
77
77
    # assigned to the _last_obj_traversed attribute.
78
78
 
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
81
81
 
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"
163
163
    ...     />
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"
170
170
    ...     />
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"
177
177
    ...     />
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"
184
184
    ...     />
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"
191
191
    ...     />
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"
198
198
    ...     />
199
199
    ... </configure>
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"
594
594
    ...     classes="
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
937
937
 
1221
1221
    >>> from zope.testing.cleanup import cleanUp
1222
1222
    >>> 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']