def test_specification_can_be_loaded_from_yml_files(url):
    cache_url(url, 'test: "123"')
    assert get_specification(
        query=MultiDict({"specification_url": url}))["test"] == "123"
def test_url_parameters_are_more_important_than_specification_url(url):
    cache_url(url, '{"test": "123"}')
    assert get_specification(query=MultiDict({
        "specification_url": url,
        "test": "test"
    }))["test"] == "test"
def test_caching_twice_works():
    cache_url("http://asd.asd", "test123")
    cache_url("http://asd.asd", "asd")
    assert get_text_from_url("http://asd.asd") == "asd"
def test_specification_prefers_url_over_default(url):
    cache_url(url, '{"css": "123"}')
    assert get_specification(
        query=MultiDict({"specification_url": url}))["css"] == "123"
def test_tests_can_cache_values():
    cache_url("http://asd.asd", "test123")
    assert get_text_from_url("http://asd.asd") == "test123"