#NEWLINE# @ mock . patch . object ( keystone . api , 'keystone' ) #NEWLINE# def test_domain_get( self , kc ) : #NEWLINE# #INDENT# request = self . mock_rest_request ( ) #NEWLINE# kc . domain_get . return_value . to_dict . return_value = { #NEWLINE# #INDENT# 'name' : 'Ni!' , #NEWLINE# #UNINDENT# } #NEWLINE# response = keystone . Domain ( ) . get ( request , 'the_id' ) #NEWLINE# self . assertStatusCode ( response , 200 ) #NEWLINE# self . assertEqual ( response . json , { #NEWLINE# #INDENT# 'name' : 'Ni!' , #NEWLINE# #UNINDENT# } ) #NEWLINE# kc . domain_get . assert_called_once_with ( request , 'the_id' )