Coverage for dataflake/fakeldap/utils.py : 90%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
############################################################################## # # Copyright (c) 2012 Jens Vagelpohl and Contributors. All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ##############################################################################
# DNs are expected to be UTF-8-encoded dn = dn.encode('UTF-8')
""" Decorator function to check one or more function arguments """
spec = inspect.getargspec(called_function) else:
def _check(*args, **kw): else: continue # fallback to default arguments
msg = 'Parameter %s must be UTF-8, found %s (%s)' raise TypeError(msg % (arg_name, str(arg_val), type(arg_val)))
|