Beispiel #1
0
 def __init__(self, context, request, view=None, title=None):
     self.path = canonical_url(context, request, view)
     if title is None:
         self.title = title_for_filename(context.base_name)
     else:
         self.title = title
Beispiel #2
0
 def canonical_url(self, context, view=None):
     return canonical_url(context, self.request, view)
Beispiel #3
0
 def assertUrl(self, resource, url, view_name=None, base_url=None):
     request = Request.blank('/', base_url=base_url)
     self.assertThat(canonical_url(resource, request, view_name),
                     Equals(url))