Skip to content

Commit 8587414

Browse files
committed
fix marker: uses_test_server->test_server
1 parent 7d899a9 commit 8587414

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

tests/test_api/test_http.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,15 @@ def test_cache(cache, sample_url_v1):
7878
assert cached.headers["Content-Type"] == "text/xml"
7979

8080

81-
@pytest.mark.uses_test_server()
81+
@pytest.mark.test_server()
8282
def test_get(http_client):
8383
response = http_client.get("task/1")
8484

8585
assert response.status_code == 200
8686
assert b"<oml:task" in response.content
8787

8888

89-
@pytest.mark.uses_test_server()
89+
@pytest.mark.test_server()
9090
def test_get_with_cache_creates_cache(http_client, cache, sample_url_v1, sample_path):
9191
response = http_client.get(sample_path, enable_cache=True)
9292

@@ -101,7 +101,7 @@ def test_get_with_cache_creates_cache(http_client, cache, sample_url_v1, sample_
101101
assert (cache_path / "body.bin").exists()
102102

103103

104-
@pytest.mark.uses_test_server()
104+
@pytest.mark.test_server()
105105
def test_get_uses_cached_response(http_client, cache, sample_url_v1, sample_path):
106106
key = cache.get_key(sample_url_v1, {})
107107
meta_path = cache._key_to_path(key) / "meta.json"
@@ -117,7 +117,7 @@ def test_get_uses_cached_response(http_client, cache, sample_url_v1, sample_path
117117
assert r1.content == r2.content
118118

119119

120-
@pytest.mark.uses_test_server()
120+
@pytest.mark.test_server()
121121
def test_get_refresh_cache(http_client, cache, sample_url_v1, sample_path):
122122
key = cache.get_key(sample_url_v1, {})
123123
meta_path = cache._key_to_path(key) / "meta.json"
@@ -133,21 +133,21 @@ def test_get_refresh_cache(http_client, cache, sample_url_v1, sample_path):
133133
assert r1.content == r2.content
134134

135135

136-
@pytest.mark.uses_test_server()
136+
@pytest.mark.test_server()
137137
def test_get_with_api_key(http_client, sample_path):
138138
response = http_client.get(sample_path, use_api_key=True)
139139

140140
assert response.status_code == 200
141141
assert b"<oml:task" in response.content
142142

143143

144-
@pytest.mark.uses_test_server()
144+
@pytest.mark.test_server()
145145
def test_get_without_api_key_raises(http_client):
146146
with openml.config.overwrite_config_context({"apikey": None}), pytest.raises(OpenMLAuthenticationError):
147147
http_client.get("task/1", use_api_key=True)
148148

149149

150-
@pytest.mark.uses_test_server()
150+
@pytest.mark.test_server()
151151
def test_download_creates_file(http_client, sample_download_url_v1):
152152
path = http_client.download(
153153
url=sample_download_url_v1,
@@ -159,7 +159,7 @@ def test_download_creates_file(http_client, sample_download_url_v1):
159159
assert path.read_text(encoding="utf-8")
160160

161161

162-
@pytest.mark.uses_test_server()
162+
@pytest.mark.test_server()
163163
def test_download_is_cached_on_disk(http_client, sample_download_url_v1):
164164
path1 = http_client.download(
165165
url=sample_download_url_v1,
@@ -177,7 +177,7 @@ def test_download_is_cached_on_disk(http_client, sample_download_url_v1):
177177
assert mtime1 == mtime2
178178

179179

180-
@pytest.mark.uses_test_server()
180+
@pytest.mark.test_server()
181181
def test_download_respects_custom_handler(http_client, sample_download_url_v1):
182182
def handler(response, path: Path, encoding: str):
183183
path.write_text("HANDLED", encoding=encoding)

0 commit comments

Comments
 (0)