def test_parser_tools_data_encode(self): data1 = { 'k1': 'v1', 'k2': 'v2', 'k3': 'v3', 'li1': ['it1', 'it2', {'k4': 'v4', 'k5': 'v5'}, 123] } res = {b'k3': b'v3', b'k2': b'v2', b'k1': b'v1', b'li1': [b'it1', b'it2', {b'k5': b'v5', b'k4': b'v4'}, 123]} self.assertEqual(data_encode(data1), res)
def test_parser_tools_data_encode(self): data1 = { 'k1': 'v1', 'k2': 'v2', 'k3': 'v3', 'li1': ['it1', 'it2', { 'k4': 'v4', 'k5': 'v5' }, 123] } res = { b'k3': b'v3', b'k2': b'v2', b'k1': b'v1', b'li1': [b'it1', b'it2', { b'k5': b'v5', b'k4': b'v4' }, 123] } self.assertEqual(data_encode(data1), res)
def __repr__(self): return 'CaselessDict(%s)' % data_encode(self)
def __repr__(self): return 'Parameters(%s)' % data_encode(self)
def __repr__(self): return '%s(%s)' % (self.name, data_encode(self))