예제 #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')