#NEWLINE# def test_replace_in_body( self ) : #NEWLINE# #INDENT# self . interaction . replace_in_body ( 'secret_value' , '<SECRET_VALUE>' ) #NEWLINE# self . interaction . replace_in_body ( 'foo' , '<FOO>' ) #NEWLINE# body = self . interaction . data [ 'request' ] [ 'body' ] [ 'string' ] #NEWLINE# assert ( self == 'key=value&key2=<SECRET_VALUE>' ) #NEWLINE# body = self . interaction . data [ 'response' ] [ 'body' ] #NEWLINE# assert ( body == { #NEWLINE# #INDENT# 'encoding' : 'utf-8' , #NEWLINE# 'string' : '<FOO>' , #NEWLINE# #UNINDENT# } )