Skip to content

Commit e545bce

Browse files
chore: update mock server docs
1 parent 0d315e0 commit e545bce

19 files changed

+788
-795
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/auth/test_connections.py

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

tests/api_resources/browsers/fs/test_watch.py

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

20-
@pytest.mark.skip(reason="Prism doesn't support text/event-stream responses")
20+
@pytest.mark.skip(reason="Mock server doesn't support text/event-stream responses")
2121
@parametrize
2222
def test_method_events(self, client: Kernel) -> None:
2323
watch_stream = client.browsers.fs.watch.events(
@@ -26,7 +26,7 @@ def test_method_events(self, client: Kernel) -> None:
2626
)
2727
watch_stream.response.close()
2828

29-
@pytest.mark.skip(reason="Prism doesn't support text/event-stream responses")
29+
@pytest.mark.skip(reason="Mock server doesn't support text/event-stream responses")
3030
@parametrize
3131
def test_raw_response_events(self, client: Kernel) -> None:
3232
response = client.browsers.fs.watch.with_raw_response.events(
@@ -38,7 +38,7 @@ def test_raw_response_events(self, client: Kernel) -> None:
3838
stream = response.parse()
3939
stream.close()
4040

41-
@pytest.mark.skip(reason="Prism doesn't support text/event-stream responses")
41+
@pytest.mark.skip(reason="Mock server doesn't support text/event-stream responses")
4242
@parametrize
4343
def test_streaming_response_events(self, client: Kernel) -> None:
4444
with client.browsers.fs.watch.with_streaming_response.events(
@@ -53,7 +53,7 @@ def test_streaming_response_events(self, client: Kernel) -> None:
5353

5454
assert cast(Any, response.is_closed) is True
5555

56-
@pytest.mark.skip(reason="Prism doesn't support text/event-stream responses")
56+
@pytest.mark.skip(reason="Mock server doesn't support text/event-stream responses")
5757
@parametrize
5858
def test_path_params_events(self, client: Kernel) -> None:
5959
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
@@ -68,7 +68,7 @@ def test_path_params_events(self, client: Kernel) -> None:
6868
id="id",
6969
)
7070

71-
@pytest.mark.skip(reason="Prism tests are disabled")
71+
@pytest.mark.skip(reason="Mock server tests are disabled")
7272
@parametrize
7373
def test_method_start(self, client: Kernel) -> None:
7474
watch = client.browsers.fs.watch.start(
@@ -77,7 +77,7 @@ def test_method_start(self, client: Kernel) -> None:
7777
)
7878
assert_matches_type(WatchStartResponse, watch, path=["response"])
7979

80-
@pytest.mark.skip(reason="Prism tests are disabled")
80+
@pytest.mark.skip(reason="Mock server tests are disabled")
8181
@parametrize
8282
def test_method_start_with_all_params(self, client: Kernel) -> None:
8383
watch = client.browsers.fs.watch.start(
@@ -87,7 +87,7 @@ def test_method_start_with_all_params(self, client: Kernel) -> None:
8787
)
8888
assert_matches_type(WatchStartResponse, watch, path=["response"])
8989

90-
@pytest.mark.skip(reason="Prism tests are disabled")
90+
@pytest.mark.skip(reason="Mock server tests are disabled")
9191
@parametrize
9292
def test_raw_response_start(self, client: Kernel) -> None:
9393
response = client.browsers.fs.watch.with_raw_response.start(
@@ -100,7 +100,7 @@ def test_raw_response_start(self, client: Kernel) -> None:
100100
watch = response.parse()
101101
assert_matches_type(WatchStartResponse, watch, path=["response"])
102102

103-
@pytest.mark.skip(reason="Prism tests are disabled")
103+
@pytest.mark.skip(reason="Mock server tests are disabled")
104104
@parametrize
105105
def test_streaming_response_start(self, client: Kernel) -> None:
106106
with client.browsers.fs.watch.with_streaming_response.start(
@@ -115,7 +115,7 @@ def test_streaming_response_start(self, client: Kernel) -> None:
115115

116116
assert cast(Any, response.is_closed) is True
117117

118-
@pytest.mark.skip(reason="Prism tests are disabled")
118+
@pytest.mark.skip(reason="Mock server tests are disabled")
119119
@parametrize
120120
def test_path_params_start(self, client: Kernel) -> None:
121121
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
@@ -124,7 +124,7 @@ def test_path_params_start(self, client: Kernel) -> None:
124124
path="path",
125125
)
126126

127-
@pytest.mark.skip(reason="Prism tests are disabled")
127+
@pytest.mark.skip(reason="Mock server tests are disabled")
128128
@parametrize
129129
def test_method_stop(self, client: Kernel) -> None:
130130
watch = client.browsers.fs.watch.stop(
@@ -133,7 +133,7 @@ def test_method_stop(self, client: Kernel) -> None:
133133
)
134134
assert watch is None
135135

136-
@pytest.mark.skip(reason="Prism tests are disabled")
136+
@pytest.mark.skip(reason="Mock server tests are disabled")
137137
@parametrize
138138
def test_raw_response_stop(self, client: Kernel) -> None:
139139
response = client.browsers.fs.watch.with_raw_response.stop(
@@ -146,7 +146,7 @@ def test_raw_response_stop(self, client: Kernel) -> None:
146146
watch = response.parse()
147147
assert watch is None
148148

149-
@pytest.mark.skip(reason="Prism tests are disabled")
149+
@pytest.mark.skip(reason="Mock server tests are disabled")
150150
@parametrize
151151
def test_streaming_response_stop(self, client: Kernel) -> None:
152152
with client.browsers.fs.watch.with_streaming_response.stop(
@@ -161,7 +161,7 @@ def test_streaming_response_stop(self, client: Kernel) -> None:
161161

162162
assert cast(Any, response.is_closed) is True
163163

164-
@pytest.mark.skip(reason="Prism tests are disabled")
164+
@pytest.mark.skip(reason="Mock server tests are disabled")
165165
@parametrize
166166
def test_path_params_stop(self, client: Kernel) -> None:
167167
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
@@ -182,7 +182,7 @@ class TestAsyncWatch:
182182
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
183183
)
184184

185-
@pytest.mark.skip(reason="Prism doesn't support text/event-stream responses")
185+
@pytest.mark.skip(reason="Mock server doesn't support text/event-stream responses")
186186
@parametrize
187187
async def test_method_events(self, async_client: AsyncKernel) -> None:
188188
watch_stream = await async_client.browsers.fs.watch.events(
@@ -191,7 +191,7 @@ async def test_method_events(self, async_client: AsyncKernel) -> None:
191191
)
192192
await watch_stream.response.aclose()
193193

194-
@pytest.mark.skip(reason="Prism doesn't support text/event-stream responses")
194+
@pytest.mark.skip(reason="Mock server doesn't support text/event-stream responses")
195195
@parametrize
196196
async def test_raw_response_events(self, async_client: AsyncKernel) -> None:
197197
response = await async_client.browsers.fs.watch.with_raw_response.events(
@@ -203,7 +203,7 @@ async def test_raw_response_events(self, async_client: AsyncKernel) -> None:
203203
stream = await response.parse()
204204
await stream.close()
205205

206-
@pytest.mark.skip(reason="Prism doesn't support text/event-stream responses")
206+
@pytest.mark.skip(reason="Mock server doesn't support text/event-stream responses")
207207
@parametrize
208208
async def test_streaming_response_events(self, async_client: AsyncKernel) -> None:
209209
async with async_client.browsers.fs.watch.with_streaming_response.events(
@@ -218,7 +218,7 @@ async def test_streaming_response_events(self, async_client: AsyncKernel) -> Non
218218

219219
assert cast(Any, response.is_closed) is True
220220

221-
@pytest.mark.skip(reason="Prism doesn't support text/event-stream responses")
221+
@pytest.mark.skip(reason="Mock server doesn't support text/event-stream responses")
222222
@parametrize
223223
async def test_path_params_events(self, async_client: AsyncKernel) -> None:
224224
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
@@ -233,7 +233,7 @@ async def test_path_params_events(self, async_client: AsyncKernel) -> None:
233233
id="id",
234234
)
235235

236-
@pytest.mark.skip(reason="Prism tests are disabled")
236+
@pytest.mark.skip(reason="Mock server tests are disabled")
237237
@parametrize
238238
async def test_method_start(self, async_client: AsyncKernel) -> None:
239239
watch = await async_client.browsers.fs.watch.start(
@@ -242,7 +242,7 @@ async def test_method_start(self, async_client: AsyncKernel) -> None:
242242
)
243243
assert_matches_type(WatchStartResponse, watch, path=["response"])
244244

245-
@pytest.mark.skip(reason="Prism tests are disabled")
245+
@pytest.mark.skip(reason="Mock server tests are disabled")
246246
@parametrize
247247
async def test_method_start_with_all_params(self, async_client: AsyncKernel) -> None:
248248
watch = await async_client.browsers.fs.watch.start(
@@ -252,7 +252,7 @@ async def test_method_start_with_all_params(self, async_client: AsyncKernel) ->
252252
)
253253
assert_matches_type(WatchStartResponse, watch, path=["response"])
254254

255-
@pytest.mark.skip(reason="Prism tests are disabled")
255+
@pytest.mark.skip(reason="Mock server tests are disabled")
256256
@parametrize
257257
async def test_raw_response_start(self, async_client: AsyncKernel) -> None:
258258
response = await async_client.browsers.fs.watch.with_raw_response.start(
@@ -265,7 +265,7 @@ async def test_raw_response_start(self, async_client: AsyncKernel) -> None:
265265
watch = await response.parse()
266266
assert_matches_type(WatchStartResponse, watch, path=["response"])
267267

268-
@pytest.mark.skip(reason="Prism tests are disabled")
268+
@pytest.mark.skip(reason="Mock server tests are disabled")
269269
@parametrize
270270
async def test_streaming_response_start(self, async_client: AsyncKernel) -> None:
271271
async with async_client.browsers.fs.watch.with_streaming_response.start(
@@ -280,7 +280,7 @@ async def test_streaming_response_start(self, async_client: AsyncKernel) -> None
280280

281281
assert cast(Any, response.is_closed) is True
282282

283-
@pytest.mark.skip(reason="Prism tests are disabled")
283+
@pytest.mark.skip(reason="Mock server tests are disabled")
284284
@parametrize
285285
async def test_path_params_start(self, async_client: AsyncKernel) -> None:
286286
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
@@ -289,7 +289,7 @@ async def test_path_params_start(self, async_client: AsyncKernel) -> None:
289289
path="path",
290290
)
291291

292-
@pytest.mark.skip(reason="Prism tests are disabled")
292+
@pytest.mark.skip(reason="Mock server tests are disabled")
293293
@parametrize
294294
async def test_method_stop(self, async_client: AsyncKernel) -> None:
295295
watch = await async_client.browsers.fs.watch.stop(
@@ -298,7 +298,7 @@ async def test_method_stop(self, async_client: AsyncKernel) -> None:
298298
)
299299
assert watch is None
300300

301-
@pytest.mark.skip(reason="Prism tests are disabled")
301+
@pytest.mark.skip(reason="Mock server tests are disabled")
302302
@parametrize
303303
async def test_raw_response_stop(self, async_client: AsyncKernel) -> None:
304304
response = await async_client.browsers.fs.watch.with_raw_response.stop(
@@ -311,7 +311,7 @@ async def test_raw_response_stop(self, async_client: AsyncKernel) -> None:
311311
watch = await response.parse()
312312
assert watch is None
313313

314-
@pytest.mark.skip(reason="Prism tests are disabled")
314+
@pytest.mark.skip(reason="Mock server tests are disabled")
315315
@parametrize
316316
async def test_streaming_response_stop(self, async_client: AsyncKernel) -> None:
317317
async with async_client.browsers.fs.watch.with_streaming_response.stop(
@@ -326,7 +326,7 @@ async def test_streaming_response_stop(self, async_client: AsyncKernel) -> None:
326326

327327
assert cast(Any, response.is_closed) is True
328328

329-
@pytest.mark.skip(reason="Prism tests are disabled")
329+
@pytest.mark.skip(reason="Mock server tests are disabled")
330330
@parametrize
331331
async def test_path_params_stop(self, async_client: AsyncKernel) -> None:
332332
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):

0 commit comments

Comments
 (0)