'If the ``X-Eliot-Task-Id`` header containers a serialized task level,
it is used as a parent of the logged actions from the handler.'

@capture_logging(None)
def test_serialized_task(self, logger):

    parent = ActionType('parent', [], [])
    with parent() as context:
        task_id = context.serialize_task_id()
    app = self.Application()
    app.logger = logger
    request = dummyRequest('GET', '/foo/bar', Headers({'X-Eliot-Task-Id': [task_id]}), '')
    render(app.app.resource(), request)
    logged_parent = LoggedAction.ofType(logger.messages, parent)[0]
    child = _assertRequestLogged('/foo/bar')(self, logger)
    self.assertIn(child, logged_parent.descendants())
