validatos no longer depend on T

This commit is contained in:
mdipierro
2019-02-24 01:51:18 -08:00
parent afaf57f6da
commit b58b7da18f
13 changed files with 129 additions and 130 deletions
+2 -2
View File
@@ -13,7 +13,7 @@ import decimal
from gluon.serializers import *
from gluon.storage import Storage
# careful with the import path 'cause of isinstance() checks
from gluon.languages import translator
from gluon.languages import TranslatorFactory
from gluon.html import SPAN
@@ -46,7 +46,7 @@ class TestSerializers(unittest.TestCase):
obj = {'a': decimal.Decimal('4.312312312312')}
self.assertEqual(json(obj), u'{"a": "4.312312312312"}')
# lazyT translated
T = translator('', 'en')
T = TranslatorFactory('', 'en')
lazy_translation = T('abc')
self.assertEqual(json(lazy_translation), u'"abc"')
# html helpers are xml()ed before too