示例#1
0
def test_ajax_load_rules():
    r = app.get('/ajax/load-rules?name=loquo')
    json = testing.parse_http_response(r, 'application/json')
    tools.assert_equal(json['name'], 'loquo')
示例#2
0
def test_ajax():
    ajax_urls = ['/ajax/load-rules?name=loquo']
    for ajax_url in ajax_urls:
        r = app.get(ajax_url)
        testing.parse_http_response(r, 'application/json')
示例#3
0
def test_css():
    for css_url in ['/css/screen.css']:
        r = app.get(css_url)
        testing.parse_http_response(r, 'text/css')
示例#4
0
def test_js():
    for js_url in ['/js/index.js']:
        r = app.get(js_url)
        testing.parse_http_response(r, 'text/javascript')
示例#5
0
def test_index():
    r = app.get('/')
    testing.parse_http_response(r, 'text/html')