#NEWLINE# @ patch ( 'flask_views.db.mongoengine.edit.super' , create = True ) #NEWLINE# def test_get_form_kwargs( self , super_mock ) : #NEWLINE# #INDENT# '\n        Test :py:meth:`.ModelFormMixin.get_form_kwargs`.\n        ' #NEWLINE# super_class = Mock ( ) #NEWLINE# super_class . get_form_kwargs . return_value = { #NEWLINE# #INDENT# 'foo' : 'bar' , #NEWLINE# #UNINDENT# } #NEWLINE# super_mock . return_value = super_class #NEWLINE# mixin = ModelFormMixin ( ) #NEWLINE# mixin . object = Mock ( ) #NEWLINE# self . assertEqual ( { #NEWLINE# #INDENT# 'foo' : 'bar' , #NEWLINE# 'obj' : mixin . object , #NEWLINE# #UNINDENT# } , mixin . get_form_kwargs ( ) ) #NEWLINE# super_mock . assert_called_once_with ( ModelFormMixin , mixin )