mς
0αΈEc @ s₯ d k Z d k Z d k l Z l Z l Z d k Z d k Z d k l Z l
Z
d k l Z d k l Z d e f d YZ
d Z e d j o e n d S( N( s TestCases makeSuites main( s
make_querys complex_marshal( s make_hidden_input( s DateTimet
QueryTestsc B s5 t Z d Z d Z d Z d Z d Z RS( Nc C sW t } d | d g } t d | f g } | d d d | f d g j p t d S(
s Test marshalling listsi t strt lists :int:lists
:date:lists :listN( s lists :int:listi ( s lists :lists str( t DateTimet test_datet list_t complex_marshalt resultt AssertionError( t selfR R R ( ( t5 /data/zmath/zope/lib/python/ZTUtils/tests/testZope.pyt testMarshallLists
s
c C si t } h d d <d | <d d <} t d | f g } | d d d
| f d g j p t d
S( s Test marshalling recordst arg1i t arg2t arg3R t records record.arg1s :int:records record.arg2s :date:records record.arg3s :recordN( s record.arg1s :int:recordi ( s record.arg3s :records str( R R R R R R ( R R R R ( ( R
t testMarshallRecords s
!c C sl t } h d d | d g <d d <} t d | f g } | d
d d | f d d g j p t d S( s( Test marshalling lists inside of recordsR i R R
R s record.arg1s :int:list:records :date:list:records :list:records record.arg2s :int:recordN( s record.arg1s :int:list:recordi ( s record.arg1s :list:records str( s record.arg2s :int:recordi ( R R R R R R ( R R R R ( ( R
t testMarshallListsInRecords s
!c C s¬ t } t i t | } h d d | d g <d d <} d | d g } | } d } d } t d | d | d | d | d | } | d
| | | f j p t
d S( s) Test that make_query returns sane resultsR i R R
t datet integert listingR t stringsΡ date:date=%s&integer:int=1&listing:int:list=1&listing:date:list=%s&listing:list=str&string=str&record.arg1:int:list:record=1&record.arg1:date:list:record=%s&record.arg1:list:record=str&record.arg2:int:record=1N( R R t urllibt quoteR t
quote_dateR R R t int_t str_t
make_queryt queryR ( R R R R R R R R R ( ( R
t testMakeComplexQuery) s !c C s t d d } | i | d t d d } | i | d t d d } | i | d t d d } | i | d t d d
} | i | d d S( Nt foot bars, i s. s bar & bazs6 s s4 s "bar"s8 ( t make_hidden_inputt tagR t assertEqual( R R! ( ( R
t testMakeHiddenInput6 s ( t __name__t
__module__R R R R R# ( ( ( R
R s
c C s
t t S( N( t makeSuiteR ( ( ( R
t
test_suiteC s t __main__( t ost syst unittestt TestCaseR&