Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)
unicode(object='') -> unicode object
unicode(string[, encoding[, errors]]) -> unicode object

Create a new Unicode object from the given encoded string.
encoding defaults to the current default string encoding.
errors can be 'strict', 'replace' or 'ignore' and defaults to 'strict'.

src/r/a/rapidsms-healthcare-0.1.0/healthcare/api.py   rapidsms-healthcare(Download)
class CategoryWrapper(object):
    "Simple wrapper to translate a category (patient/provider) of backend calls."
 
    _lookup_mapping = {
        '': comparisons.EQUAL,
        'exact': comparisons.EQUAL,

src/r/a/rapidsms-healthcare-0.1.0/healthcare/tests/test_api.py   rapidsms-healthcare(Download)
            test_calls = (
                # Filter args, Expected backend call
                ({'name': 'Jane'}, [('name', comparisons.EQUAL, 'Jane')]),
                ({'name__like': 'Jane'}, [('name', comparisons.LIKE, 'Jane')]),
                ({'name__in': ('Jane', )}, [('name', comparisons.IN, ('Jane', ))]),
            test_calls = (
                # Filter args, Expected backend call
                ({'name': 'Jane'}, [('name', comparisons.EQUAL, 'Jane')]),
                ({'name__like': 'Jane'}, [('name', comparisons.LIKE, 'Jane')]),
                ({'name__in': ('Jane', )}, [('name', comparisons.IN, ('Jane', ))]),

src/r/a/rapidsms-healthcare-0.1.0/healthcare/tests/backends/base.py   rapidsms-healthcare(Download)
        tests = (
            # Operator, Value, Expected
            (comparisons.EQUAL, 'Joe', [patient]),
            (comparisons.LIKE, 'Jo', [patient]),
            (comparisons.LIKE, 'J', [patient, other_patient]),
            (comparisons.GT, today, []),
            (comparisons.GTE, today, [patient]),
            (comparisons.EQUAL, last_week, [other_patient]),
        )
        for op, val, expected in tests:
        tests = (
            # Operator, Value, Expected
            (comparisons.EQUAL, 'Joe', [provider]),
            (comparisons.LIKE, 'Jo', [provider]),
            (comparisons.LIKE, 'J', [provider, other_provider]),