def test_should_add_to_readahead_no_referrer_yes_header(): assert should_add_to_readahead(EX_CONFIG, None, HEADER_YES) is True
def test_should_add_to_readahead_no_referrer(): assert should_add_to_readahead(EX_CONFIG, None, HEADER_NO) is False
def test_should_add_to_readahead_sane_url_no_header(): assert should_add_to_readahead(EX_CONFIG, 'http://grafana/blah', HEADER_NO) is True
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
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
def test_should_add_to_readahead_header_set(): assert should_add_to_readahead(EX_CONFIG, 'http://whatever', HEADER_YES) is True