equal
deleted
inserted
replaced
3 :organization: Logilab |
3 :organization: Logilab |
4 :copyright: 2001-2010 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2. |
4 :copyright: 2001-2010 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 try: |
|
9 from json import loads |
|
10 except ImportError: |
|
11 from simplejson import loads |
|
12 |
|
13 from logilab.common.testlib import unittest_main |
8 from logilab.common.testlib import unittest_main |
14 from logilab.mtconverter import html_unescape |
9 from logilab.mtconverter import html_unescape |
15 |
10 |
16 from cubicweb.devtools.testlib import CubicWebTC |
11 from cubicweb.devtools.testlib import CubicWebTC |
17 |
12 |
18 from cubicweb.web.htmlwidgets import TableWidget |
13 from cubicweb.web.htmlwidgets import TableWidget |
19 from cubicweb.web.views import vid_from_rset |
14 from cubicweb.web.views import vid_from_rset |
|
15 from cubicweb.web import json |
|
16 loads = json.loads |
20 |
17 |
21 def loadjson(value): |
18 def loadjson(value): |
22 return loads(html_unescape(value)) |
19 return loads(html_unescape(value)) |
23 |
20 |
24 class VidFromRsetTC(CubicWebTC): |
21 class VidFromRsetTC(CubicWebTC): |