Changeset 8142


Ignore:
Timestamp:
13 Apr 2012, 10:11:13 (13 years ago)
Author:
Henrik Bettermann
Message:

Remove breakpoint and prepare formatted_text() for unit tests.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/students
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py

    r8141 r8142  
    713713        lang = self.request.cookies.get('kofa.language')
    714714        for value in self.context.values():
    715             import pdb; pdb.set_trace()
    716715            value_dict = value.__dict__
    717716            value_dict['mandatory'] = translate(str(value.mandatory), 'zope',
  • main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py

    r8141 r8142  
    7777    The returned snippet is unicode type.
    7878    """
    79     portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
     79    try:
     80        # In unit tests IKofaUtils has not been registered
     81        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
     82    except:
     83        portal_language = 'en'
    8084    if not isinstance(text, unicode):
    8185        if isinstance(text, basestring):
Note: See TracChangeset for help on using the changeset viewer.