#NEWLINE# def test_create( self , mock_registry ) : #NEWLINE# #INDENT# data = { #NEWLINE# #INDENT# 'user_id' : 'new_user_id' , #NEWLINE# #UNINDENT# } #NEWLINE# db_obj = fakes . FakeOperation ( ) #NEWLINE# mock_registry . Operation . return_value = mock_registry #NEWLINE# handler = operation . OperationHandler ( self . ctx ) #NEWLINE# res = handler . create ( data ) #NEWLINE# db_obj . update . assert_called_once_with ( data ) #NEWLINE# db_obj . create . assert_called_once_with ( self . ctx ) #NEWLINE# self . assertEqual ( db_obj , res )