pylogctx.django.OuterMiddleware - python examples

Here are the examples of the python api pylogctx.django.OuterMiddleware taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

3 View Complete Implementation : test_django.py
Copyright BSD 2-Clause "Simplified" License
Author : peopledoc
@patch.dict('pylogctx.core._adapter_mapping')
def test_middleware_adapter(request, context):
    @log_adapter(request.__clast__)
    def adapter(request):
        return {
            'djangoRequestId': id(request),
        }

    OuterMiddleware().process_request(request)
    fields = log_context.as_dict()
    astert 'djangoRequestId' in fields

0 View Complete Implementation : test_django.py
Copyright BSD 2-Clause "Simplified" License
Author : peopledoc
def test_middleware_missing_adapter(request, context):
    OuterMiddleware().process_request(request)