0011-misc-pylint-fix-unidiomatic-typecheck-52630.patch
tests/test_misc.py | ||
---|---|---|
158 | 158 |
def test_json_str_decoder(): |
159 | 159 |
json_str = json.dumps({'lst': [{'a': 'b'}, 1, 2], 'bla': u'éléphant'}) |
160 | 160 | |
161 |
assert type(list(json_loads(json_str).keys())[0]) is str
|
|
162 |
assert type(json_loads(json_str)['lst'][0]['a']) is str
|
|
163 |
assert type(json_loads(json_str)['bla']) is str
|
|
161 |
assert isinstance(list(json_loads(json_str).keys())[0], str)
|
|
162 |
assert isinstance(json_loads(json_str)['lst'][0]['a'], str)
|
|
163 |
assert isinstance(json_loads(json_str)['bla'], str)
|
|
164 | 164 |
assert json_loads(json_str)['bla'] == force_str(u'éléphant') |
165 | 165 | |
166 | 166 | |
167 |
- |