Example #1
0
def list(request):
    c = RequestContext(request, {
        'confection': "Ram's bladder cup"
    })

    pa = PageAssembly('goodies/list/list.yaml', c)

    return pa.get_http_response()
Example #2
0
def subject_start(request):
    """
    Is the temporary page we see as the test runner is bootstrapping, it gives
    us some brief information before the test runs start
    """
    context = RequestContext(request)
    pa = PageAssembly('chirp/testrunner/subjectstart/subjectstart.yaml', context)
    return pa.get_http_response()
Example #3
0
def interface_start(request):
    """
    Provides the main HTML for the test runner
    """
    if not is_instrumented():
        instrument_site(True)
    teps = [ i.__dict__ for i in test_registry.list() ]
    context = RequestContext(request, {
        'test_count': len(test_registry),
        'test_entry_points_json': simplejson.dumps(teps),
        'url_deinstrument': reverse(deinstrument),
    })

    pa = PageAssembly('chirp/testrunner/display/display.yaml', context)
    return pa.get_http_response()
def test_returns_http_response():
    request = get_request_fixture()
    c = RequestContext(request, {"foo": "bar"})
    pa = PageAssembly("dummyapp/page/sample.yaml", c)

    assert isinstance(pa.get_http_response(), HttpResponse)