summaryrefslogtreecommitdiff
path: root/addons/web/static/lib/py.js/test/test.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web/static/lib/py.js/test/test.js')
-rw-r--r--addons/web/static/lib/py.js/test/test.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/addons/web/static/lib/py.js/test/test.js b/addons/web/static/lib/py.js/test/test.js
index 31fccc23240..c1f92c44d81 100644
--- a/addons/web/static/lib/py.js/test/test.js
+++ b/addons/web/static/lib/py.js/test/test.js
@@ -376,4 +376,13 @@ describe('numerical protocols', function () {
});
});
});
-}); \ No newline at end of file
+});
+describe('Type converter', function () {
+ it('should convert bare objects to objects', function () {
+ expect(py.eval('foo.bar', {foo: {bar: 3}})).to.be(3);
+ });
+ it('should convert arrays to lists', function () {
+ expect(py.eval('foo[3]', {foo: [9, 8, 7, 6, 5]}))
+ .to.be(6);
+ });
+});