[test] Pass __module__ upon instantiation of RegistrableInstance 3.26
authorDenis Laxalde <denis.laxalde@logilab.fr>
Fri, 08 Mar 2019 11:50:20 +0100
branch3.26
changeset 12486 d189d10e2469
parent 12485 2b4c1ad6fbf1
child 12487 76f7753e81a2
[test] Pass __module__ upon instantiation of RegistrableInstance This gets rid of the deprecation warning from logilab.common.registry: DeprecationWarning: instantiate MyAFS with __module__=__name__ and solves a test error on Python 3.7.
cubicweb/devtools/test/data/libpython/cubicweb_i18ntestcube/views.py
--- a/cubicweb/devtools/test/data/libpython/cubicweb_i18ntestcube/views.py	Fri Mar 08 12:00:47 2019 +0100
+++ b/cubicweb/devtools/test/data/libpython/cubicweb_i18ntestcube/views.py	Fri Mar 08 11:50:20 2019 +0100
@@ -24,7 +24,7 @@
 class MyAFS(uicfg.AutoformSectionRelationTags):
     __select__ = is_instance('ForumThread')
 
-_myafs = MyAFS()
+_myafs = MyAFS(__module__=__name__)
 
 _myafs.tag_object_of(('*', 'in_forum', 'Forum'), 'main', 'inlined')