#NEWLINE# def test_encode_string_to_json( self ) : #NEWLINE# #INDENT# jparams = ( 'endkey' , 'key' , 'startkey' ) #NEWLINE# values = ( 'dummy' , 42 , None , True , False , { #NEWLINE# #INDENT# 'chicken' : 'broth' , #NEWLINE# #UNINDENT# } , [ 'noodle' , 'soup' ] , [ 'lone element' ] , ( 'empty tuple' , ) ) #NEWLINE# for p in jparams : #NEWLINE# #INDENT# for v in values : #NEWLINE# #INDENT# expected = ( ( p + '=' ) + ulp . quote ( json . dumps ( v ) ) ) #NEWLINE# print ( 'Expected' , expected ) #NEWLINE# self . _assert_vopteq ( expected , p , v ) #NEWLINE# #UNINDENT# self . assertRaises ( ArgumentError , self . _assert_vopteq , 'blah' , p , object ( ) )