Skip to content

Commit 1967778

Browse files
chore: update mock server docs
1 parent 31ba7fd commit 1967778

11 files changed

Lines changed: 224 additions & 231 deletions

File tree

‎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/actions/test_execute.py‎

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@
2222
class TestExecute:
2323
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
2424

25-
@pytest.mark.skip(reason="Prism tests are disabled")
25+
@pytest.mark.skip(reason="Mock server tests are disabled")
2626
@parametrize
2727
def test_method_execute(self, client: ModerationAPI) -> None:
2828
execute = client.actions.execute.execute(
2929
action_key="actionKey",
3030
)
3131
assert_matches_type(ExecuteExecuteResponse, execute, path=["response"])
3232

33-
@pytest.mark.skip(reason="Prism tests are disabled")
33+
@pytest.mark.skip(reason="Mock server tests are disabled")
3434
@parametrize
3535
def test_method_execute_with_all_params(self, client: ModerationAPI) -> None:
3636
execute = client.actions.execute.execute(
@@ -43,7 +43,7 @@ def test_method_execute_with_all_params(self, client: ModerationAPI) -> None:
4343
)
4444
assert_matches_type(ExecuteExecuteResponse, execute, path=["response"])
4545

46-
@pytest.mark.skip(reason="Prism tests are disabled")
46+
@pytest.mark.skip(reason="Mock server tests are disabled")
4747
@parametrize
4848
def test_raw_response_execute(self, client: ModerationAPI) -> None:
4949
response = client.actions.execute.with_raw_response.execute(
@@ -55,7 +55,7 @@ def test_raw_response_execute(self, client: ModerationAPI) -> None:
5555
execute = response.parse()
5656
assert_matches_type(ExecuteExecuteResponse, execute, path=["response"])
5757

58-
@pytest.mark.skip(reason="Prism tests are disabled")
58+
@pytest.mark.skip(reason="Mock server tests are disabled")
5959
@parametrize
6060
def test_streaming_response_execute(self, client: ModerationAPI) -> None:
6161
with client.actions.execute.with_streaming_response.execute(
@@ -69,7 +69,7 @@ def test_streaming_response_execute(self, client: ModerationAPI) -> None:
6969

7070
assert cast(Any, response.is_closed) is True
7171

72-
@pytest.mark.skip(reason="Prism tests are disabled")
72+
@pytest.mark.skip(reason="Mock server tests are disabled")
7373
@parametrize
7474
def test_method_execute_by_id(self, client: ModerationAPI) -> None:
7575
with pytest.warns(DeprecationWarning):
@@ -79,7 +79,7 @@ def test_method_execute_by_id(self, client: ModerationAPI) -> None:
7979

8080
assert_matches_type(ExecuteExecuteByIDResponse, execute, path=["response"])
8181

82-
@pytest.mark.skip(reason="Prism tests are disabled")
82+
@pytest.mark.skip(reason="Mock server tests are disabled")
8383
@parametrize
8484
def test_method_execute_by_id_with_all_params(self, client: ModerationAPI) -> None:
8585
with pytest.warns(DeprecationWarning):
@@ -93,7 +93,7 @@ def test_method_execute_by_id_with_all_params(self, client: ModerationAPI) -> No
9393

9494
assert_matches_type(ExecuteExecuteByIDResponse, execute, path=["response"])
9595

96-
@pytest.mark.skip(reason="Prism tests are disabled")
96+
@pytest.mark.skip(reason="Mock server tests are disabled")
9797
@parametrize
9898
def test_raw_response_execute_by_id(self, client: ModerationAPI) -> None:
9999
with pytest.warns(DeprecationWarning):
@@ -106,7 +106,7 @@ def test_raw_response_execute_by_id(self, client: ModerationAPI) -> None:
106106
execute = response.parse()
107107
assert_matches_type(ExecuteExecuteByIDResponse, execute, path=["response"])
108108

109-
@pytest.mark.skip(reason="Prism tests are disabled")
109+
@pytest.mark.skip(reason="Mock server tests are disabled")
110110
@parametrize
111111
def test_streaming_response_execute_by_id(self, client: ModerationAPI) -> None:
112112
with pytest.warns(DeprecationWarning):
@@ -121,7 +121,7 @@ def test_streaming_response_execute_by_id(self, client: ModerationAPI) -> None:
121121

122122
assert cast(Any, response.is_closed) is True
123123

124-
@pytest.mark.skip(reason="Prism tests are disabled")
124+
@pytest.mark.skip(reason="Mock server tests are disabled")
125125
@parametrize
126126
def test_path_params_execute_by_id(self, client: ModerationAPI) -> None:
127127
with pytest.warns(DeprecationWarning):
@@ -136,15 +136,15 @@ class TestAsyncExecute:
136136
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
137137
)
138138

139-
@pytest.mark.skip(reason="Prism tests are disabled")
139+
@pytest.mark.skip(reason="Mock server tests are disabled")
140140
@parametrize
141141
async def test_method_execute(self, async_client: AsyncModerationAPI) -> None:
142142
execute = await async_client.actions.execute.execute(
143143
action_key="actionKey",
144144
)
145145
assert_matches_type(ExecuteExecuteResponse, execute, path=["response"])
146146

147-
@pytest.mark.skip(reason="Prism tests are disabled")
147+
@pytest.mark.skip(reason="Mock server tests are disabled")
148148
@parametrize
149149
async def test_method_execute_with_all_params(self, async_client: AsyncModerationAPI) -> None:
150150
execute = await async_client.actions.execute.execute(
@@ -157,7 +157,7 @@ async def test_method_execute_with_all_params(self, async_client: AsyncModeratio
157157
)
158158
assert_matches_type(ExecuteExecuteResponse, execute, path=["response"])
159159

160-
@pytest.mark.skip(reason="Prism tests are disabled")
160+
@pytest.mark.skip(reason="Mock server tests are disabled")
161161
@parametrize
162162
async def test_raw_response_execute(self, async_client: AsyncModerationAPI) -> None:
163163
response = await async_client.actions.execute.with_raw_response.execute(
@@ -169,7 +169,7 @@ async def test_raw_response_execute(self, async_client: AsyncModerationAPI) -> N
169169
execute = await response.parse()
170170
assert_matches_type(ExecuteExecuteResponse, execute, path=["response"])
171171

172-
@pytest.mark.skip(reason="Prism tests are disabled")
172+
@pytest.mark.skip(reason="Mock server tests are disabled")
173173
@parametrize
174174
async def test_streaming_response_execute(self, async_client: AsyncModerationAPI) -> None:
175175
async with async_client.actions.execute.with_streaming_response.execute(
@@ -183,7 +183,7 @@ async def test_streaming_response_execute(self, async_client: AsyncModerationAPI
183183

184184
assert cast(Any, response.is_closed) is True
185185

186-
@pytest.mark.skip(reason="Prism tests are disabled")
186+
@pytest.mark.skip(reason="Mock server tests are disabled")
187187
@parametrize
188188
async def test_method_execute_by_id(self, async_client: AsyncModerationAPI) -> None:
189189
with pytest.warns(DeprecationWarning):
@@ -193,7 +193,7 @@ async def test_method_execute_by_id(self, async_client: AsyncModerationAPI) -> N
193193

194194
assert_matches_type(ExecuteExecuteByIDResponse, execute, path=["response"])
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_method_execute_by_id_with_all_params(self, async_client: AsyncModerationAPI) -> None:
199199
with pytest.warns(DeprecationWarning):
@@ -207,7 +207,7 @@ async def test_method_execute_by_id_with_all_params(self, async_client: AsyncMod
207207

208208
assert_matches_type(ExecuteExecuteByIDResponse, execute, 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_raw_response_execute_by_id(self, async_client: AsyncModerationAPI) -> None:
213213
with pytest.warns(DeprecationWarning):
@@ -220,7 +220,7 @@ async def test_raw_response_execute_by_id(self, async_client: AsyncModerationAPI
220220
execute = await response.parse()
221221
assert_matches_type(ExecuteExecuteByIDResponse, execute, path=["response"])
222222

223-
@pytest.mark.skip(reason="Prism tests are disabled")
223+
@pytest.mark.skip(reason="Mock server tests are disabled")
224224
@parametrize
225225
async def test_streaming_response_execute_by_id(self, async_client: AsyncModerationAPI) -> None:
226226
with pytest.warns(DeprecationWarning):
@@ -235,7 +235,7 @@ async def test_streaming_response_execute_by_id(self, async_client: AsyncModerat
235235

236236
assert cast(Any, response.is_closed) is True
237237

238-
@pytest.mark.skip(reason="Prism tests are disabled")
238+
@pytest.mark.skip(reason="Mock server tests are disabled")
239239
@parametrize
240240
async def test_path_params_execute_by_id(self, async_client: AsyncModerationAPI) -> None:
241241
with pytest.warns(DeprecationWarning):

0 commit comments

Comments
 (0)