%PDF- %PDF-
Direktori : /opt/alt/python27/lib64/python2.7/site-packages/simplejson/tests/ |
Current File : //opt/alt/python27/lib64/python2.7/site-packages/simplejson/tests/test_encode_for_html.pyo |
� �UzMc @ sA d d l Z d d l Z d d l Z d e j f d � � YZ d S( i����Nt TestEncodeForHTMLc B s, e Z d � Z d � Z d � Z d � Z RS( c C s( t j j � | _ t j j � | _ d S( N( t simplejsont decodert JSONDecodert encodert JSONEncoderForHTML( t self( ( sX /opt/alt/python27/lib64/python2.7/site-packages/simplejson/tests/test_encode_for_html.pyt setUp s c C sX | j d | j j d � � | j d | j j d � � | j d | j j d � � d S( Ns "\u0026"t &s "\u003c"t <s "\u003e"t >( t assertEqualR t encode( R ( ( sX /opt/alt/python27/lib64/python2.7/site-packages/simplejson/tests/test_encode_for_html.pyt test_basic_encode s c C s= x6 d D]. } | j | | j j | j j | � � � q Wd S( Ns &<>( R R t decodeR R ( R t char( ( sX /opt/alt/python27/lib64/python2.7/site-packages/simplejson/tests/test_encode_for_html.pyt test_basic_roundtrip s c C sN d } | j d | j j | � � | j | | j j | j j | � � � d S( Ns) </script><script>alert("gotcha")</script>sK "\u003c/script\u003e\u003cscript\u003ealert(\"gotcha\")\u003c/script\u003e"( R R R R R ( R t bad_string( ( sX /opt/alt/python27/lib64/python2.7/site-packages/simplejson/tests/test_encode_for_html.pyt test_prevent_script_breakout s ( t __name__t __module__R R R R ( ( ( sX /opt/alt/python27/lib64/python2.7/site-packages/simplejson/tests/test_encode_for_html.pyR s ( t unittestt simplejson.decoderR t simplejson.encodert TestCaseR ( ( ( sX /opt/alt/python27/lib64/python2.7/site-packages/simplejson/tests/test_encode_for_html.pyt <module> s