web/test/unittest_views_editforms.py
changeset 3722 c414f402cbff
parent 3589 a5432f99f2d9
child 3777 3ef8cdb5fb1c
equal deleted inserted replaced
3721:a02f7df5bbec 3722:c414f402cbff
     4 :copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2.
     4 :copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2.
     5 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
     5 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
     6 :license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses
     6 :license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses
     7 """
     7 """
     8 from logilab.common.testlib import unittest_main
     8 from logilab.common.testlib import unittest_main
       
     9 from logilab.common.compat import any
       
    10 
     9 from cubicweb.devtools.testlib import CubicWebTC
    11 from cubicweb.devtools.testlib import CubicWebTC
    10 from cubicweb.web.views.autoform import AutomaticEntityForm as AEF
    12 from cubicweb.web.views.autoform import AutomaticEntityForm as AEF
    11 from cubicweb.web.formwidgets import AutoCompletionWidget
    13 from cubicweb.web.formwidgets import AutoCompletionWidget
       
    14 
    12 def rbc(entity, category):
    15 def rbc(entity, category):
    13     return [(rschema.type, x) for rschema, tschemas, x in AEF.erelations_by_category(entity, category)]
    16     return [(rschema.type, x) for rschema, tschemas, x in AEF.erelations_by_category(entity, category)]
    14 
    17 
    15 class AutomaticEntityFormTC(CubicWebTC):
    18 class AutomaticEntityFormTC(CubicWebTC):
    16 
    19