Python bottle.view() Examples

The following are 1 code examples of bottle.view(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module bottle , or try the search function .
Example #1
Source File: test_bottle.py    From aws-xray-sdk-python with Apache License 2.0 5 votes vote down vote up
def test_render_view():
    path = '/view'
    response = app.get(path)
    assert response.text == "<h1>Hello Bottle!</h1>\n<p>How are you?</p>\n"
    segment = recorder.emitter.pop()
    assert not segment.in_progress
    # segment should contain a template render subsegment
    assert segment.subsegments

    subsegment = segment.subsegments[0]
    assert subsegment.name
    assert subsegment.namespace == 'local'
    assert not subsegment.in_progress