tweak member registration view to simplify testing
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@1678 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
5acee802e0
commit
d436849790
2 changed files with 4 additions and 3 deletions
|
@ -212,7 +212,7 @@ and register it
|
|||
>>> from zope.publisher.browser import TestRequest
|
||||
>>> request = TestRequest()
|
||||
>>> from loops.organize.browser import MemberRegistration
|
||||
>>> regView = MemberRegistration(menu, request)
|
||||
>>> regView = MemberRegistration(menu, request, testing=True)
|
||||
>>> personAdapter = regView.register(data)
|
||||
|
||||
>>> personAdapter.context.__name__, personAdapter.lastName, personAdapter.userId
|
||||
|
|
|
@ -79,9 +79,10 @@ class MemberRegistration(NodeView, Form):
|
|||
template = loops.browser.util.dataform
|
||||
label = _(u'Member Registration')
|
||||
|
||||
def __init__(self, context, request):
|
||||
def __init__(self, context, request, testing=False):
|
||||
super(MemberRegistration, self).__init__(context, request)
|
||||
self.setUpWidgets()
|
||||
if not testing:
|
||||
self.setUpWidgets()
|
||||
|
||||
@Lazy
|
||||
def macro(self):
|
||||
|
|
Loading…
Add table
Reference in a new issue