#NEWLINE# def test_notif_manager_create( self ) : #NEWLINE# #INDENT# clt = self . client #NEWLINE# mgr = clt . _notification_manager #NEWLINE# obj_id = utils . random_unicode ( ) #NEWLINE# fake_resp = fakes . FakeResponse ( ) #NEWLINE# fake_resp . headers = { #NEWLINE# #INDENT# 'x-object-id' : obj_id , #NEWLINE# #UNINDENT# } #NEWLINE# mgr . api . method_post = Mock ( return_value = ( fake_resp , None ) ) #NEWLINE# mgr . get = Mock ( ) #NEWLINE# ntyp = utils . random_unicode ( ) #NEWLINE# label = utils . random_unicode ( ) #NEWLINE# name = utils . random_unicode ( ) #NEWLINE# details = utils . random_unicode ( ) #NEWLINE# exp_uri = ( '/%s' % mgr . uri_base ) #NEWLINE# exp_body = { #NEWLINE# #INDENT# 'label' : ( label or name ) , #NEWLINE# 'type' : ntyp , #NEWLINE# 'details' : details , #NEWLINE# #UNINDENT# } #NEWLINE# mgr . create ( ntyp , label = label , name = name , details = details ) #NEWLINE# mgr . api . method_post . assert_called_once_with ( exp_uri , body = exp_body )