#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# policy_files = { #NEWLINE# #INDENT# 'identity' : 'policy.v3cloudsample.json' , #NEWLINE# 'compute' : 'nova_policy.json' , #NEWLINE# #UNINDENT# } #NEWLINE# override = self . settings ( POLICY_FILES = policy_files ) #NEWLINE# override . enable ( ) #NEWLINE# self . addCleanup ( override . disable ) #NEWLINE# mock_user = user . User ( id = 1 , roles = self . _roles , user_domain_id = 'admin_domain_id' ) #NEWLINE# patcher = mock . patch ( 'openstack_auth.utils.get_user' , return_value = mock_user ) #NEWLINE# self . MockClass = patcher . start ( ) #NEWLINE# self . addCleanup ( patcher . stop ) #NEWLINE# self . request = http . HttpRequest ( )