devtools/testlib.py
changeset 7272 771f594c12a2
parent 7222 fcb8932082a5
child 7314 d3104c697adb
equal deleted inserted replaced
7271:2bd70418b601 7272:771f594c12a2
   560                      and not issubclass(view, notification.NotificationView)
   560                      and not issubclass(view, notification.NotificationView)
   561                      and not isinstance(view, class_deprecated)]
   561                      and not isinstance(view, class_deprecated)]
   562             if views:
   562             if views:
   563                 try:
   563                 try:
   564                     view = viewsvreg._select_best(views, req, rset=rset)
   564                     view = viewsvreg._select_best(views, req, rset=rset)
       
   565                     if view is None:
       
   566                         raise NoSelectableObject((req,), {'rset':rset}, views)
   565                     if view.linkable():
   567                     if view.linkable():
   566                         yield view
   568                         yield view
   567                     else:
   569                     else:
   568                         not_selected(self.vreg, view)
   570                         not_selected(self.vreg, view)
   569                     # else the view is expected to be used as subview and should
   571                     # else the view is expected to be used as subview and should