#NEWLINE# def decorate_class( self , klass ) : #NEWLINE# #INDENT# 'Decorates methods in a class with request_mock\n\n        Method will be decorated only if it name begins with `TEST_PREFIX`\n\n        :param object klass: class which methods will be decorated\n        ' #NEWLINE# for attr_name in dir ( klass ) : #NEWLINE# #INDENT# if ( not attr_name . startswith ( self . TEST_PREFIX ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# attr = getattr ( klass , attr_name ) #NEWLINE# if ( not hasattr ( attr , '__call__' ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# m = self . copy ( ) #NEWLINE# setattr ( klass , attr_name , m ( attr ) ) #NEWLINE# #UNINDENT# return klass