示例#1
0
def test_should_add_to_readahead_no_referrer_yes_header():
    assert should_add_to_readahead(EX_CONFIG, None, HEADER_YES) is True
示例#2
0
def test_should_add_to_readahead_no_referrer():
    assert should_add_to_readahead(EX_CONFIG, None, HEADER_NO) is False
示例#3
0
def test_should_add_to_readahead_sane_url_no_header():
    assert should_add_to_readahead(EX_CONFIG, 'http://grafana/blah', HEADER_NO) is True
示例#4
0
def test_should_add_to_readahead_edit_url_no_header():
    assert should_add_to_readahead(EX_CONFIG, 'http://grafana/blah&edit', HEADER_NO) is False
示例#5
0
def test_should_add_to_readahead_edit_url_with_header():
    assert should_add_to_readahead(EX_CONFIG, 'http://grafana/blah&edit', HEADER_YES) is True
示例#6
0
def test_should_add_to_readahead_header_set():
    assert should_add_to_readahead(EX_CONFIG, 'http://whatever', HEADER_YES) is True