#NEWLINE# def mock_response_client( test ) : #NEWLINE# #INDENT# @ functools . wraps ( test ) #NEWLINE# @ httpretty . activate #NEWLINE# def wrapper( * args , **kw ) : #NEWLINE# #INDENT# name = test . __name__ . replace ( 'test_' , '' ) #NEWLINE# httpretty . httpretty . register_uri ( httpretty . httpretty . POST , PyflareClient . CLOUDFLARE_URL , body = client_responses [ name ] , content_type = 'application/json' ) #NEWLINE# return test ( * args , ** kw ) #NEWLINE# #UNINDENT# return test