#NEWLINE# def test_check( self ) : #NEWLINE# #INDENT# sot = node . Node ( FAKE ) #NEWLINE# sot [ 'id' ] = 'IDENTIFIER' #NEWLINE# resp = mock . Mock ( ) #NEWLINE# resp . json = { #NEWLINE# #INDENT# 'action' : '1234-5678-abcd' , #NEWLINE# #UNINDENT# } #NEWLINE# sess = mock . Mock ( ) #NEWLINE# sess . post = mock . Mock ( return_value = resp ) #NEWLINE# self . assertEqual ( resp . json , sot . check ( sess ) ) #NEWLINE# url = ( 'nodes/%s/actions' % sot . id ) #NEWLINE# body = { #NEWLINE# #INDENT# 'check' : { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# sess . post . assert_called_once_with ( url , endpoint_filter = sot . service , json = body )