def createRealInstance(self): from plone.formwidget.datetime.z3cform.widget import DateWidget request = {} instance = DateWidget(request) instance.drequest = request instance.name = 'field' return instance
def createInstance(self): from plone.formwidget.datetime.z3cform.widget import DateWidget instance = DateWidget(mock.Mock()) instance.name = 'field' return instance
def createInstance(self): from plone.formwidget.datetime.z3cform.widget import DateWidget instance = DateWidget(mock.Mock()) instance.name = 'field' instance.field = schema.Date(title=u'field') return instance