devtools/testlib.py
changeset 6454 97203d0af4cb
parent 6442 ac7126d2cd73
child 6470 8936b6786fb9
equal deleted inserted replaced
6453:7fdd780d87e4 6454:97203d0af4cb
    35 from logilab.common.testlib import TestCase, InnerTest, Tags
    35 from logilab.common.testlib import TestCase, InnerTest, Tags
    36 from logilab.common.pytest import nocoverage, pause_tracing, resume_tracing
    36 from logilab.common.pytest import nocoverage, pause_tracing, resume_tracing
    37 from logilab.common.debugger import Debugger
    37 from logilab.common.debugger import Debugger
    38 from logilab.common.umessage import message_from_string
    38 from logilab.common.umessage import message_from_string
    39 from logilab.common.decorators import cached, classproperty, clear_cache
    39 from logilab.common.decorators import cached, classproperty, clear_cache
    40 from logilab.common.deprecation import deprecated
    40 from logilab.common.deprecation import deprecated, class_deprecated
    41 
    41 
    42 from cubicweb import ValidationError, NoSelectableObject, AuthenticationError
    42 from cubicweb import ValidationError, NoSelectableObject, AuthenticationError
    43 from cubicweb import cwconfig, devtools, web, server
    43 from cubicweb import cwconfig, devtools, web, server
    44 from cubicweb.dbapi import ProgrammingError, DBAPISession, repo_connect
    44 from cubicweb.dbapi import ProgrammingError, DBAPISession, repo_connect
    45 from cubicweb.sobjects import notification
    45 from cubicweb.sobjects import notification
   493                 continue
   493                 continue
   494             if rset.rowcount > 1 and vid in only_once_vids:
   494             if rset.rowcount > 1 and vid in only_once_vids:
   495                 continue
   495                 continue
   496             views = [view for view in views
   496             views = [view for view in views
   497                      if view.category != 'startupview'
   497                      if view.category != 'startupview'
   498                      and not issubclass(view, notification.NotificationView)]
   498                      and not issubclass(view, notification.NotificationView)
       
   499                      and not isinstance(view, class_deprecated)]
   499             if views:
   500             if views:
   500                 try:
   501                 try:
   501                     view = viewsvreg._select_best(views, req, rset=rset)
   502                     view = viewsvreg._select_best(views, req, rset=rset)
   502                     if view.linkable():
   503                     if view.linkable():
   503                         yield view
   504                         yield view