Skip to content

Commit 54f47c6

Browse files
chore: update mock server docs
1 parent 978ed61 commit 54f47c6

16 files changed

+502
-509
lines changed

CONTRIBUTING.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,6 @@ $ pip install ./path-to-wheel-file.whl
8585

8686
## Running tests
8787

88-
Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.
89-
90-
```sh
91-
# you will need npm installed
92-
$ npx prism mock path/to/your/openapi.yml
93-
```
94-
9588
```sh
9689
$ ./scripts/test
9790
```

tests/api_resources/accounts/test_origins.py

Lines changed: 166 additions & 166 deletions
Large diffs are not rendered by default.

tests/api_resources/accounts/test_url_endpoints.py

Lines changed: 40 additions & 40 deletions
Large diffs are not rendered by default.

tests/api_resources/accounts/test_usage.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
class TestUsage:
1919
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
2020

21-
@pytest.mark.skip(reason="Prism tests are disabled")
21+
@pytest.mark.skip(reason="Mock server tests are disabled")
2222
@parametrize
2323
def test_method_get(self, client: ImageKit) -> None:
2424
usage = client.accounts.usage.get(
@@ -27,7 +27,7 @@ def test_method_get(self, client: ImageKit) -> None:
2727
)
2828
assert_matches_type(UsageGetResponse, usage, path=["response"])
2929

30-
@pytest.mark.skip(reason="Prism tests are disabled")
30+
@pytest.mark.skip(reason="Mock server tests are disabled")
3131
@parametrize
3232
def test_raw_response_get(self, client: ImageKit) -> None:
3333
response = client.accounts.usage.with_raw_response.get(
@@ -40,7 +40,7 @@ def test_raw_response_get(self, client: ImageKit) -> None:
4040
usage = response.parse()
4141
assert_matches_type(UsageGetResponse, usage, path=["response"])
4242

43-
@pytest.mark.skip(reason="Prism tests are disabled")
43+
@pytest.mark.skip(reason="Mock server tests are disabled")
4444
@parametrize
4545
def test_streaming_response_get(self, client: ImageKit) -> None:
4646
with client.accounts.usage.with_streaming_response.get(
@@ -61,7 +61,7 @@ class TestAsyncUsage:
6161
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
6262
)
6363

64-
@pytest.mark.skip(reason="Prism tests are disabled")
64+
@pytest.mark.skip(reason="Mock server tests are disabled")
6565
@parametrize
6666
async def test_method_get(self, async_client: AsyncImageKit) -> None:
6767
usage = await async_client.accounts.usage.get(
@@ -70,7 +70,7 @@ async def test_method_get(self, async_client: AsyncImageKit) -> None:
7070
)
7171
assert_matches_type(UsageGetResponse, usage, path=["response"])
7272

73-
@pytest.mark.skip(reason="Prism tests are disabled")
73+
@pytest.mark.skip(reason="Mock server tests are disabled")
7474
@parametrize
7575
async def test_raw_response_get(self, async_client: AsyncImageKit) -> None:
7676
response = await async_client.accounts.usage.with_raw_response.get(
@@ -83,7 +83,7 @@ async def test_raw_response_get(self, async_client: AsyncImageKit) -> None:
8383
usage = await response.parse()
8484
assert_matches_type(UsageGetResponse, usage, path=["response"])
8585

86-
@pytest.mark.skip(reason="Prism tests are disabled")
86+
@pytest.mark.skip(reason="Mock server tests are disabled")
8787
@parametrize
8888
async def test_streaming_response_get(self, async_client: AsyncImageKit) -> None:
8989
async with async_client.accounts.usage.with_streaming_response.get(

tests/api_resources/beta/v2/test_files.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
class TestFiles:
1818
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
1919

20-
@pytest.mark.skip(reason="Prism tests are disabled")
20+
@pytest.mark.skip(reason="Mock server tests are disabled")
2121
@parametrize
2222
def test_method_upload(self, client: ImageKit) -> None:
2323
file = client.beta.v2.files.upload(
@@ -26,7 +26,7 @@ def test_method_upload(self, client: ImageKit) -> None:
2626
)
2727
assert_matches_type(FileUploadResponse, file, path=["response"])
2828

29-
@pytest.mark.skip(reason="Prism tests are disabled")
29+
@pytest.mark.skip(reason="Mock server tests are disabled")
3030
@parametrize
3131
def test_method_upload_with_all_params(self, client: ImageKit) -> None:
3232
file = client.beta.v2.files.upload(
@@ -138,7 +138,7 @@ def test_method_upload_with_all_params(self, client: ImageKit) -> None:
138138
)
139139
assert_matches_type(FileUploadResponse, file, path=["response"])
140140

141-
@pytest.mark.skip(reason="Prism tests are disabled")
141+
@pytest.mark.skip(reason="Mock server tests are disabled")
142142
@parametrize
143143
def test_raw_response_upload(self, client: ImageKit) -> None:
144144
response = client.beta.v2.files.with_raw_response.upload(
@@ -151,7 +151,7 @@ def test_raw_response_upload(self, client: ImageKit) -> None:
151151
file = response.parse()
152152
assert_matches_type(FileUploadResponse, file, path=["response"])
153153

154-
@pytest.mark.skip(reason="Prism tests are disabled")
154+
@pytest.mark.skip(reason="Mock server tests are disabled")
155155
@parametrize
156156
def test_streaming_response_upload(self, client: ImageKit) -> None:
157157
with client.beta.v2.files.with_streaming_response.upload(
@@ -172,7 +172,7 @@ class TestAsyncFiles:
172172
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
173173
)
174174

175-
@pytest.mark.skip(reason="Prism tests are disabled")
175+
@pytest.mark.skip(reason="Mock server tests are disabled")
176176
@parametrize
177177
async def test_method_upload(self, async_client: AsyncImageKit) -> None:
178178
file = await async_client.beta.v2.files.upload(
@@ -181,7 +181,7 @@ async def test_method_upload(self, async_client: AsyncImageKit) -> None:
181181
)
182182
assert_matches_type(FileUploadResponse, file, path=["response"])
183183

184-
@pytest.mark.skip(reason="Prism tests are disabled")
184+
@pytest.mark.skip(reason="Mock server tests are disabled")
185185
@parametrize
186186
async def test_method_upload_with_all_params(self, async_client: AsyncImageKit) -> None:
187187
file = await async_client.beta.v2.files.upload(
@@ -293,7 +293,7 @@ async def test_method_upload_with_all_params(self, async_client: AsyncImageKit)
293293
)
294294
assert_matches_type(FileUploadResponse, file, path=["response"])
295295

296-
@pytest.mark.skip(reason="Prism tests are disabled")
296+
@pytest.mark.skip(reason="Mock server tests are disabled")
297297
@parametrize
298298
async def test_raw_response_upload(self, async_client: AsyncImageKit) -> None:
299299
response = await async_client.beta.v2.files.with_raw_response.upload(
@@ -306,7 +306,7 @@ async def test_raw_response_upload(self, async_client: AsyncImageKit) -> None:
306306
file = await response.parse()
307307
assert_matches_type(FileUploadResponse, file, path=["response"])
308308

309-
@pytest.mark.skip(reason="Prism tests are disabled")
309+
@pytest.mark.skip(reason="Mock server tests are disabled")
310310
@parametrize
311311
async def test_streaming_response_upload(self, async_client: AsyncImageKit) -> None:
312312
async with async_client.beta.v2.files.with_streaming_response.upload(

tests/api_resources/cache/test_invalidation.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717
class TestInvalidation:
1818
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
1919

20-
@pytest.mark.skip(reason="Prism tests are disabled")
20+
@pytest.mark.skip(reason="Mock server tests are disabled")
2121
@parametrize
2222
def test_method_create(self, client: ImageKit) -> None:
2323
invalidation = client.cache.invalidation.create(
2424
url="https://ik.imagekit.io/your_imagekit_id/default-image.jpg",
2525
)
2626
assert_matches_type(InvalidationCreateResponse, invalidation, path=["response"])
2727

28-
@pytest.mark.skip(reason="Prism tests are disabled")
28+
@pytest.mark.skip(reason="Mock server tests are disabled")
2929
@parametrize
3030
def test_raw_response_create(self, client: ImageKit) -> None:
3131
response = client.cache.invalidation.with_raw_response.create(
@@ -37,7 +37,7 @@ def test_raw_response_create(self, client: ImageKit) -> None:
3737
invalidation = response.parse()
3838
assert_matches_type(InvalidationCreateResponse, invalidation, path=["response"])
3939

40-
@pytest.mark.skip(reason="Prism tests are disabled")
40+
@pytest.mark.skip(reason="Mock server tests are disabled")
4141
@parametrize
4242
def test_streaming_response_create(self, client: ImageKit) -> None:
4343
with client.cache.invalidation.with_streaming_response.create(
@@ -51,15 +51,15 @@ def test_streaming_response_create(self, client: ImageKit) -> None:
5151

5252
assert cast(Any, response.is_closed) is True
5353

54-
@pytest.mark.skip(reason="Prism tests are disabled")
54+
@pytest.mark.skip(reason="Mock server tests are disabled")
5555
@parametrize
5656
def test_method_get(self, client: ImageKit) -> None:
5757
invalidation = client.cache.invalidation.get(
5858
"requestId",
5959
)
6060
assert_matches_type(InvalidationGetResponse, invalidation, path=["response"])
6161

62-
@pytest.mark.skip(reason="Prism tests are disabled")
62+
@pytest.mark.skip(reason="Mock server tests are disabled")
6363
@parametrize
6464
def test_raw_response_get(self, client: ImageKit) -> None:
6565
response = client.cache.invalidation.with_raw_response.get(
@@ -71,7 +71,7 @@ def test_raw_response_get(self, client: ImageKit) -> None:
7171
invalidation = response.parse()
7272
assert_matches_type(InvalidationGetResponse, invalidation, path=["response"])
7373

74-
@pytest.mark.skip(reason="Prism tests are disabled")
74+
@pytest.mark.skip(reason="Mock server tests are disabled")
7575
@parametrize
7676
def test_streaming_response_get(self, client: ImageKit) -> None:
7777
with client.cache.invalidation.with_streaming_response.get(
@@ -85,7 +85,7 @@ def test_streaming_response_get(self, client: ImageKit) -> None:
8585

8686
assert cast(Any, response.is_closed) is True
8787

88-
@pytest.mark.skip(reason="Prism tests are disabled")
88+
@pytest.mark.skip(reason="Mock server tests are disabled")
8989
@parametrize
9090
def test_path_params_get(self, client: ImageKit) -> None:
9191
with pytest.raises(ValueError, match=r"Expected a non-empty value for `request_id` but received ''"):
@@ -99,15 +99,15 @@ class TestAsyncInvalidation:
9999
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
100100
)
101101

102-
@pytest.mark.skip(reason="Prism tests are disabled")
102+
@pytest.mark.skip(reason="Mock server tests are disabled")
103103
@parametrize
104104
async def test_method_create(self, async_client: AsyncImageKit) -> None:
105105
invalidation = await async_client.cache.invalidation.create(
106106
url="https://ik.imagekit.io/your_imagekit_id/default-image.jpg",
107107
)
108108
assert_matches_type(InvalidationCreateResponse, invalidation, path=["response"])
109109

110-
@pytest.mark.skip(reason="Prism tests are disabled")
110+
@pytest.mark.skip(reason="Mock server tests are disabled")
111111
@parametrize
112112
async def test_raw_response_create(self, async_client: AsyncImageKit) -> None:
113113
response = await async_client.cache.invalidation.with_raw_response.create(
@@ -119,7 +119,7 @@ async def test_raw_response_create(self, async_client: AsyncImageKit) -> None:
119119
invalidation = await response.parse()
120120
assert_matches_type(InvalidationCreateResponse, invalidation, path=["response"])
121121

122-
@pytest.mark.skip(reason="Prism tests are disabled")
122+
@pytest.mark.skip(reason="Mock server tests are disabled")
123123
@parametrize
124124
async def test_streaming_response_create(self, async_client: AsyncImageKit) -> None:
125125
async with async_client.cache.invalidation.with_streaming_response.create(
@@ -133,15 +133,15 @@ async def test_streaming_response_create(self, async_client: AsyncImageKit) -> N
133133

134134
assert cast(Any, response.is_closed) is True
135135

136-
@pytest.mark.skip(reason="Prism tests are disabled")
136+
@pytest.mark.skip(reason="Mock server tests are disabled")
137137
@parametrize
138138
async def test_method_get(self, async_client: AsyncImageKit) -> None:
139139
invalidation = await async_client.cache.invalidation.get(
140140
"requestId",
141141
)
142142
assert_matches_type(InvalidationGetResponse, invalidation, path=["response"])
143143

144-
@pytest.mark.skip(reason="Prism tests are disabled")
144+
@pytest.mark.skip(reason="Mock server tests are disabled")
145145
@parametrize
146146
async def test_raw_response_get(self, async_client: AsyncImageKit) -> None:
147147
response = await async_client.cache.invalidation.with_raw_response.get(
@@ -153,7 +153,7 @@ async def test_raw_response_get(self, async_client: AsyncImageKit) -> None:
153153
invalidation = await response.parse()
154154
assert_matches_type(InvalidationGetResponse, invalidation, path=["response"])
155155

156-
@pytest.mark.skip(reason="Prism tests are disabled")
156+
@pytest.mark.skip(reason="Mock server tests are disabled")
157157
@parametrize
158158
async def test_streaming_response_get(self, async_client: AsyncImageKit) -> None:
159159
async with async_client.cache.invalidation.with_streaming_response.get(
@@ -167,7 +167,7 @@ async def test_streaming_response_get(self, async_client: AsyncImageKit) -> None
167167

168168
assert cast(Any, response.is_closed) is True
169169

170-
@pytest.mark.skip(reason="Prism tests are disabled")
170+
@pytest.mark.skip(reason="Mock server tests are disabled")
171171
@parametrize
172172
async def test_path_params_get(self, async_client: AsyncImageKit) -> None:
173173
with pytest.raises(ValueError, match=r"Expected a non-empty value for `request_id` but received ''"):

0 commit comments

Comments
 (0)