Skip to content

Commit 8c5c6d3

Browse files
chore: update mock server docs
1 parent 7443a18 commit 8c5c6d3

File tree

9 files changed

+288
-295
lines changed

9 files changed

+288
-295
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/messages/test_batch.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
class TestBatch:
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_create(self, client: Agentex) -> None:
2424
batch = client.messages.batch.create(
@@ -33,7 +33,7 @@ def test_method_create(self, client: Agentex) -> None:
3333
)
3434
assert_matches_type(BatchCreateResponse, batch, path=["response"])
3535

36-
@pytest.mark.skip(reason="Prism tests are disabled")
36+
@pytest.mark.skip(reason="Mock server tests are disabled")
3737
@parametrize
3838
def test_raw_response_create(self, client: Agentex) -> None:
3939
response = client.messages.batch.with_raw_response.create(
@@ -52,7 +52,7 @@ def test_raw_response_create(self, client: Agentex) -> None:
5252
batch = response.parse()
5353
assert_matches_type(BatchCreateResponse, batch, path=["response"])
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_streaming_response_create(self, client: Agentex) -> None:
5858
with client.messages.batch.with_streaming_response.create(
@@ -73,7 +73,7 @@ def test_streaming_response_create(self, client: Agentex) -> None:
7373

7474
assert cast(Any, response.is_closed) is True
7575

76-
@pytest.mark.skip(reason="Prism tests are disabled")
76+
@pytest.mark.skip(reason="Mock server tests are disabled")
7777
@parametrize
7878
def test_method_update(self, client: Agentex) -> None:
7979
batch = client.messages.batch.update(
@@ -88,7 +88,7 @@ def test_method_update(self, client: Agentex) -> None:
8888
)
8989
assert_matches_type(BatchUpdateResponse, batch, path=["response"])
9090

91-
@pytest.mark.skip(reason="Prism tests are disabled")
91+
@pytest.mark.skip(reason="Mock server tests are disabled")
9292
@parametrize
9393
def test_raw_response_update(self, client: Agentex) -> None:
9494
response = client.messages.batch.with_raw_response.update(
@@ -107,7 +107,7 @@ def test_raw_response_update(self, client: Agentex) -> None:
107107
batch = response.parse()
108108
assert_matches_type(BatchUpdateResponse, batch, 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
def test_streaming_response_update(self, client: Agentex) -> None:
113113
with client.messages.batch.with_streaming_response.update(
@@ -134,7 +134,7 @@ class TestAsyncBatch:
134134
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
135135
)
136136

137-
@pytest.mark.skip(reason="Prism tests are disabled")
137+
@pytest.mark.skip(reason="Mock server tests are disabled")
138138
@parametrize
139139
async def test_method_create(self, async_client: AsyncAgentex) -> None:
140140
batch = await async_client.messages.batch.create(
@@ -149,7 +149,7 @@ async def test_method_create(self, async_client: AsyncAgentex) -> None:
149149
)
150150
assert_matches_type(BatchCreateResponse, batch, path=["response"])
151151

152-
@pytest.mark.skip(reason="Prism tests are disabled")
152+
@pytest.mark.skip(reason="Mock server tests are disabled")
153153
@parametrize
154154
async def test_raw_response_create(self, async_client: AsyncAgentex) -> None:
155155
response = await async_client.messages.batch.with_raw_response.create(
@@ -168,7 +168,7 @@ async def test_raw_response_create(self, async_client: AsyncAgentex) -> None:
168168
batch = await response.parse()
169169
assert_matches_type(BatchCreateResponse, batch, path=["response"])
170170

171-
@pytest.mark.skip(reason="Prism tests are disabled")
171+
@pytest.mark.skip(reason="Mock server tests are disabled")
172172
@parametrize
173173
async def test_streaming_response_create(self, async_client: AsyncAgentex) -> None:
174174
async with async_client.messages.batch.with_streaming_response.create(
@@ -189,7 +189,7 @@ async def test_streaming_response_create(self, async_client: AsyncAgentex) -> No
189189

190190
assert cast(Any, response.is_closed) is True
191191

192-
@pytest.mark.skip(reason="Prism tests are disabled")
192+
@pytest.mark.skip(reason="Mock server tests are disabled")
193193
@parametrize
194194
async def test_method_update(self, async_client: AsyncAgentex) -> None:
195195
batch = await async_client.messages.batch.update(
@@ -204,7 +204,7 @@ async def test_method_update(self, async_client: AsyncAgentex) -> None:
204204
)
205205
assert_matches_type(BatchUpdateResponse, batch, path=["response"])
206206

207-
@pytest.mark.skip(reason="Prism tests are disabled")
207+
@pytest.mark.skip(reason="Mock server tests are disabled")
208208
@parametrize
209209
async def test_raw_response_update(self, async_client: AsyncAgentex) -> None:
210210
response = await async_client.messages.batch.with_raw_response.update(
@@ -223,7 +223,7 @@ async def test_raw_response_update(self, async_client: AsyncAgentex) -> None:
223223
batch = await response.parse()
224224
assert_matches_type(BatchUpdateResponse, batch, path=["response"])
225225

226-
@pytest.mark.skip(reason="Prism tests are disabled")
226+
@pytest.mark.skip(reason="Mock server tests are disabled")
227227
@parametrize
228228
async def test_streaming_response_update(self, async_client: AsyncAgentex) -> None:
229229
async with async_client.messages.batch.with_streaming_response.update(

0 commit comments

Comments
 (0)