示例#1
0
def test_error_not_found_returns_status_object():
    request = testing.DummyRequest()

    result = views.error_not_found(context=None, request=request)

    assert result == {'status': 'failure', 'reason': 'not_found'}
示例#2
0
def test_error_not_found_sets_status_code():
    request = testing.DummyRequest()

    views.error_not_found(context=None, request=request)

    assert request.response.status_code == 404