Changeset 5075 for main


Ignore:
Timestamp:
24 Mar 2010, 09:30:57 (15 years ago)
Author:
uli
Message:

Add custom checker for tests: 10 digits shall appear as '<10-DIGITS>'.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/tests/test_waeup.py

    r4920 r5075  
    55"""
    66import grok
     7import re
    78import zope.component.eventtesting
     9from zope.testing import renormalizing
    810from waeup.sirp.testing import FunctionalLayer
    911
     
    1113    zope.component.eventtesting.setUp(test)
    1214
     15checker = renormalizing.RENormalizing([
     16        (re.compile('[\d]{10}'), '<10-DIGITS>'),
     17        ])
     18   
    1319# Register all tests in the waeup_ng package
    1420test_suite = grok.testing.register_all_tests(
    15     'waeup.sirp', usetup=setUpZope,
     21    'waeup.sirp', checker=checker, usetup=setUpZope,
    1622    layer=FunctionalLayer)
Note: See TracChangeset for help on using the changeset viewer.