'string.upper' and 'string.lower' has been deprecated in Python 3

Signed-off-by: Satoshi Kobayashi <satoshi-k@stratosphere.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
Satoshi Kobayashi 2015-04-14 13:18:22 +09:00 committed by FUJITA Tomonori
parent 8e0e09ec64
commit 82fcd1b015

View File

@ -52,13 +52,12 @@ class Test_stringify(unittest.TestCase):
eq_(j, c.to_jsondict())
def test_jsondict2(self):
import string
def my_encode(x):
return string.lower(x)
return x.lower()
def my_decode(x):
return string.upper(x)
return x.upper()
j = {'C1': {'a': 'aaa', 'c': 'ccc'}}
eq_(j['C1']['a'], my_encode('AAA'))