/usr/lib/python2.6/site-packages/oslo_serialization/tests
Edit: /usr/lib/python2.6/site-packages/oslo_serialization/tests/test_jsonutils.pyc (15630B)
Ñò
|DVc @ s d d k Z d d k Z d d k Z d d k Z d d k Z d d k l Z d d k l Z d d k
Z
d d k Z d d k i
i Z d d k l Z d e f d „ ƒ YZ d e e i f d „ ƒ YZ d e e i f d
„ ƒ YZ d e i f d „ ƒ YZ d S(
iÿÿÿÿN( t fixture( t base( t jsonutilst JSONUtilsTestMixinc B sh e Z d
Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z
d „ Z d „ Z d „ Z
RS( c C sV t t | ƒ i ƒ t i i t d | i d | i t j ƒ| _ | i i
ƒ | _ d S( Nt jsont
is_simplejson( t superR t setUpt mockt patcht multipleR t json_implt
simplejsont json_patchert startt json_impl_mock( t self( ( sS /tmp/pip-build-lt8jXN/oslo.serialization/oslo_serialization/tests/test_jsonutils.pyR # s
c C s$ | i i ƒ t t | ƒ i ƒ d S( N( R
t stopR R t tearDown( R ( ( sS /tmp/pip-build-lt8jXN/oslo.serialization/oslo_serialization/tests/test_jsonutils.pyR * s
c C s$ | i d t i h d d 6ƒ ƒ d S( Ns
{"a": "b"}t bt a( t assertEqualR t dumps( R ( ( sS /tmp/pip-build-lt8jXN/oslo.serialization/oslo_serialization/tests/test_jsonutils.pyt
test_dumps. s c C s8 t i d d ƒ d d ƒ } | i d t i | ƒ ƒ d S( Nt foos bar bazi i s [1, 2]( t collectionst
namedtupleR R R ( R t n( ( sS /tmp/pip-build-lt8jXN/oslo.serialization/oslo_serialization/tests/test_jsonutils.pyt test_dumps_namedtuple1 s c C sI d } h d d 6} t i ƒ } t i | | ƒ | i | | i ƒ ƒ d S( Ns
{"a": "b"}R R ( t sixt StringIOR t dumpR t getvalue( R t expectedt json_dictt fp( ( sS /tmp/pip-build-lt8jXN/oslo.serialization/oslo_serialization/tests/test_jsonutils.pyt test_dump5 s
c C sW d } t i d d ƒ d d ƒ } t i ƒ } t i | | ƒ | i | | i ƒ ƒ d S( Ns [1, 2]R s bar bazi i ( R R R R R R R R ( R R! R" R# ( ( sS /tmp/pip-build-lt8jXN/oslo.serialization/oslo_serialization/tests/test_jsonutils.pyt test_dump_namedtuple> s
c C s$ | i h d d 6t i d ƒ ƒ d S( NR R s
{"a": "b"}( R R t loads( R ( ( sS /tmp/pip-build-lt8jXN/oslo.serialization/oslo_serialization/tests/test_jsonutils.pyt
test_loadsG s c C s‰ | i t i d ƒ t i ƒ | i t i d ƒ t i ƒ d } | i t i | ƒ t i ƒ | i d ƒ } | i t i | ƒ t i ƒ d S( Ns "foo"u "foo"u
"теÑÑ‚"s utf-8( t assertIsInstanceR R&