Esempio n. 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')
Esempio n. 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')
Esempio n. 3
0
def test_css():
    for css_url in ['/css/screen.css']:
        r = app.get(css_url)
        testing.parse_http_response(r, 'text/css')
Esempio n. 4
0
def test_js():
    for js_url in ['/js/index.js']:
        r = app.get(js_url)
        testing.parse_http_response(r, 'text/javascript')
Esempio n. 5
0
def test_index():
    r = app.get('/')
    testing.parse_http_response(r, 'text/html')