Commit 47fcf7b8 authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

[test] fix test broken by 5721:61d6a4caa963, and update it to proper adapters...

[test] fix test broken by 5721:61d6a4caa963, and update it to proper adapters to avoid deprecation warning
parent 2ae478c47089
......@@ -15,9 +15,7 @@
# You should have received a copy of the GNU Lesser General Public License along
# with CubicWeb. If not, see <>.
from logilab.common.testlib import unittest_main, TestCase
from os.path import join
......@@ -27,7 +25,7 @@ from cubicweb.appobject import AppObject
from cubicweb.cwvreg import CubicWebVRegistry, UnknownProperty
from cubicweb.devtools import TestServerConfiguration
from cubicweb.devtools.testlib import CubicWebTC
from cubicweb.interfaces import IMileStone
from cubicweb.view import EntityAdapter
from cubes.card.entities import Card
......@@ -61,14 +59,15 @@ class VRegistryTC(TestCase):
# we've to emulate register_objects to add custom MyCard objects
path = [join(BASE, 'entities', ''),
join(BASE, 'entities', ''),
join(BASE, 'web', 'views', '')]
filemods = self.vreg.init_registration(path, None)
for filepath, modname in filemods:
self.vreg.load_file(filepath, modname)
class MyCard(Card):
__implements__ = (IMileStone,)
class CardIProgressAdapter(EntityAdapter):
__regid__ = 'IProgress'
self.vreg._loadedmods[__name__] = {}
# check progressbar isn't kicked
self.assertEquals(len(self.vreg['views']['progressbar']), 1)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment