Skip to content

Commit 9a0e0ad

Browse files
chore: update mock server docs
1 parent bbe2b1d commit 9a0e0ad

File tree

4 files changed

+96
-103
lines changed

4 files changed

+96
-103
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/agent/test_runs.py

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@
1818
class TestRuns:
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_retrieve(self, client: OzAPI) -> None:
2424
run = client.agent.runs.retrieve(
2525
"runId",
2626
)
2727
assert_matches_type(RunItem, run, 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_raw_response_retrieve(self, client: OzAPI) -> None:
3232
response = client.agent.runs.with_raw_response.retrieve(
@@ -38,7 +38,7 @@ def test_raw_response_retrieve(self, client: OzAPI) -> None:
3838
run = response.parse()
3939
assert_matches_type(RunItem, run, path=["response"])
4040

41-
@pytest.mark.skip(reason="Prism tests are disabled")
41+
@pytest.mark.skip(reason="Mock server tests are disabled")
4242
@parametrize
4343
def test_streaming_response_retrieve(self, client: OzAPI) -> None:
4444
with client.agent.runs.with_streaming_response.retrieve(
@@ -52,21 +52,21 @@ def test_streaming_response_retrieve(self, client: OzAPI) -> None:
5252

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

55-
@pytest.mark.skip(reason="Prism tests are disabled")
55+
@pytest.mark.skip(reason="Mock server tests are disabled")
5656
@parametrize
5757
def test_path_params_retrieve(self, client: OzAPI) -> None:
5858
with pytest.raises(ValueError, match=r"Expected a non-empty value for `run_id` but received ''"):
5959
client.agent.runs.with_raw_response.retrieve(
6060
"",
6161
)
6262

63-
@pytest.mark.skip(reason="Prism tests are disabled")
63+
@pytest.mark.skip(reason="Mock server tests are disabled")
6464
@parametrize
6565
def test_method_list(self, client: OzAPI) -> None:
6666
run = client.agent.runs.list()
6767
assert_matches_type(RunListResponse, run, path=["response"])
6868

69-
@pytest.mark.skip(reason="Prism tests are disabled")
69+
@pytest.mark.skip(reason="Mock server tests are disabled")
7070
@parametrize
7171
def test_method_list_with_all_params(self, client: OzAPI) -> None:
7272
run = client.agent.runs.list(
@@ -89,7 +89,7 @@ def test_method_list_with_all_params(self, client: OzAPI) -> None:
8989
)
9090
assert_matches_type(RunListResponse, run, path=["response"])
9191

92-
@pytest.mark.skip(reason="Prism tests are disabled")
92+
@pytest.mark.skip(reason="Mock server tests are disabled")
9393
@parametrize
9494
def test_raw_response_list(self, client: OzAPI) -> None:
9595
response = client.agent.runs.with_raw_response.list()
@@ -99,7 +99,7 @@ def test_raw_response_list(self, client: OzAPI) -> None:
9999
run = response.parse()
100100
assert_matches_type(RunListResponse, run, path=["response"])
101101

102-
@pytest.mark.skip(reason="Prism tests are disabled")
102+
@pytest.mark.skip(reason="Mock server tests are disabled")
103103
@parametrize
104104
def test_streaming_response_list(self, client: OzAPI) -> None:
105105
with client.agent.runs.with_streaming_response.list() as response:
@@ -111,15 +111,15 @@ def test_streaming_response_list(self, client: OzAPI) -> None:
111111

112112
assert cast(Any, response.is_closed) is True
113113

114-
@pytest.mark.skip(reason="Prism tests are disabled")
114+
@pytest.mark.skip(reason="Mock server tests are disabled")
115115
@parametrize
116116
def test_method_cancel(self, client: OzAPI) -> None:
117117
run = client.agent.runs.cancel(
118118
"runId",
119119
)
120120
assert_matches_type(str, run, 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
def test_raw_response_cancel(self, client: OzAPI) -> None:
125125
response = client.agent.runs.with_raw_response.cancel(
@@ -131,7 +131,7 @@ def test_raw_response_cancel(self, client: OzAPI) -> None:
131131
run = response.parse()
132132
assert_matches_type(str, run, path=["response"])
133133

134-
@pytest.mark.skip(reason="Prism tests are disabled")
134+
@pytest.mark.skip(reason="Mock server tests are disabled")
135135
@parametrize
136136
def test_streaming_response_cancel(self, client: OzAPI) -> None:
137137
with client.agent.runs.with_streaming_response.cancel(
@@ -145,7 +145,7 @@ def test_streaming_response_cancel(self, client: OzAPI) -> None:
145145

146146
assert cast(Any, response.is_closed) is True
147147

148-
@pytest.mark.skip(reason="Prism tests are disabled")
148+
@pytest.mark.skip(reason="Mock server tests are disabled")
149149
@parametrize
150150
def test_path_params_cancel(self, client: OzAPI) -> None:
151151
with pytest.raises(ValueError, match=r"Expected a non-empty value for `run_id` but received ''"):
@@ -159,15 +159,15 @@ class TestAsyncRuns:
159159
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
160160
)
161161

162-
@pytest.mark.skip(reason="Prism tests are disabled")
162+
@pytest.mark.skip(reason="Mock server tests are disabled")
163163
@parametrize
164164
async def test_method_retrieve(self, async_client: AsyncOzAPI) -> None:
165165
run = await async_client.agent.runs.retrieve(
166166
"runId",
167167
)
168168
assert_matches_type(RunItem, run, path=["response"])
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_raw_response_retrieve(self, async_client: AsyncOzAPI) -> None:
173173
response = await async_client.agent.runs.with_raw_response.retrieve(
@@ -179,7 +179,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncOzAPI) -> None:
179179
run = await response.parse()
180180
assert_matches_type(RunItem, run, path=["response"])
181181

182-
@pytest.mark.skip(reason="Prism tests are disabled")
182+
@pytest.mark.skip(reason="Mock server tests are disabled")
183183
@parametrize
184184
async def test_streaming_response_retrieve(self, async_client: AsyncOzAPI) -> None:
185185
async with async_client.agent.runs.with_streaming_response.retrieve(
@@ -193,21 +193,21 @@ async def test_streaming_response_retrieve(self, async_client: AsyncOzAPI) -> No
193193

194194
assert cast(Any, response.is_closed) is True
195195

196-
@pytest.mark.skip(reason="Prism tests are disabled")
196+
@pytest.mark.skip(reason="Mock server tests are disabled")
197197
@parametrize
198198
async def test_path_params_retrieve(self, async_client: AsyncOzAPI) -> None:
199199
with pytest.raises(ValueError, match=r"Expected a non-empty value for `run_id` but received ''"):
200200
await async_client.agent.runs.with_raw_response.retrieve(
201201
"",
202202
)
203203

204-
@pytest.mark.skip(reason="Prism tests are disabled")
204+
@pytest.mark.skip(reason="Mock server tests are disabled")
205205
@parametrize
206206
async def test_method_list(self, async_client: AsyncOzAPI) -> None:
207207
run = await async_client.agent.runs.list()
208208
assert_matches_type(RunListResponse, run, path=["response"])
209209

210-
@pytest.mark.skip(reason="Prism tests are disabled")
210+
@pytest.mark.skip(reason="Mock server tests are disabled")
211211
@parametrize
212212
async def test_method_list_with_all_params(self, async_client: AsyncOzAPI) -> None:
213213
run = await async_client.agent.runs.list(
@@ -230,7 +230,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncOzAPI) -> No
230230
)
231231
assert_matches_type(RunListResponse, run, path=["response"])
232232

233-
@pytest.mark.skip(reason="Prism tests are disabled")
233+
@pytest.mark.skip(reason="Mock server tests are disabled")
234234
@parametrize
235235
async def test_raw_response_list(self, async_client: AsyncOzAPI) -> None:
236236
response = await async_client.agent.runs.with_raw_response.list()
@@ -240,7 +240,7 @@ async def test_raw_response_list(self, async_client: AsyncOzAPI) -> None:
240240
run = await response.parse()
241241
assert_matches_type(RunListResponse, run, path=["response"])
242242

243-
@pytest.mark.skip(reason="Prism tests are disabled")
243+
@pytest.mark.skip(reason="Mock server tests are disabled")
244244
@parametrize
245245
async def test_streaming_response_list(self, async_client: AsyncOzAPI) -> None:
246246
async with async_client.agent.runs.with_streaming_response.list() as response:
@@ -252,15 +252,15 @@ async def test_streaming_response_list(self, async_client: AsyncOzAPI) -> None:
252252

253253
assert cast(Any, response.is_closed) is True
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_method_cancel(self, async_client: AsyncOzAPI) -> None:
258258
run = await async_client.agent.runs.cancel(
259259
"runId",
260260
)
261261
assert_matches_type(str, run, path=["response"])
262262

263-
@pytest.mark.skip(reason="Prism tests are disabled")
263+
@pytest.mark.skip(reason="Mock server tests are disabled")
264264
@parametrize
265265
async def test_raw_response_cancel(self, async_client: AsyncOzAPI) -> None:
266266
response = await async_client.agent.runs.with_raw_response.cancel(
@@ -272,7 +272,7 @@ async def test_raw_response_cancel(self, async_client: AsyncOzAPI) -> None:
272272
run = await response.parse()
273273
assert_matches_type(str, run, path=["response"])
274274

275-
@pytest.mark.skip(reason="Prism tests are disabled")
275+
@pytest.mark.skip(reason="Mock server tests are disabled")
276276
@parametrize
277277
async def test_streaming_response_cancel(self, async_client: AsyncOzAPI) -> None:
278278
async with async_client.agent.runs.with_streaming_response.cancel(
@@ -286,7 +286,7 @@ async def test_streaming_response_cancel(self, async_client: AsyncOzAPI) -> None
286286

287287
assert cast(Any, response.is_closed) is True
288288

289-
@pytest.mark.skip(reason="Prism tests are disabled")
289+
@pytest.mark.skip(reason="Mock server tests are disabled")
290290
@parametrize
291291
async def test_path_params_cancel(self, async_client: AsyncOzAPI) -> None:
292292
with pytest.raises(ValueError, match=r"Expected a non-empty value for `run_id` but received ''"):

0 commit comments

Comments
 (0)