Skip to content

Commit b382215

Browse files
chore: update mock server docs
1 parent 1135336 commit b382215

File tree

7 files changed

+220
-227
lines changed

7 files changed

+220
-227
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/test_client.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717
class TestClient:
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_add(self, client: Supermemory) -> None:
2323
client_ = client.add(
2424
content="content",
2525
)
2626
assert_matches_type(AddResponse, client_, 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_method_add_with_all_params(self, client: Supermemory) -> None:
3131
client_ = client.add(
@@ -38,7 +38,7 @@ def test_method_add_with_all_params(self, client: Supermemory) -> None:
3838
)
3939
assert_matches_type(AddResponse, client_, 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_raw_response_add(self, client: Supermemory) -> None:
4444
response = client.with_raw_response.add(
@@ -50,7 +50,7 @@ def test_raw_response_add(self, client: Supermemory) -> None:
5050
client_ = response.parse()
5151
assert_matches_type(AddResponse, client_, path=["response"])
5252

53-
@pytest.mark.skip(reason="Prism tests are disabled")
53+
@pytest.mark.skip(reason="Mock server tests are disabled")
5454
@parametrize
5555
def test_streaming_response_add(self, client: Supermemory) -> None:
5656
with client.with_streaming_response.add(
@@ -64,15 +64,15 @@ def test_streaming_response_add(self, client: Supermemory) -> None:
6464

6565
assert cast(Any, response.is_closed) is True
6666

67-
@pytest.mark.skip(reason="Prism tests are disabled")
67+
@pytest.mark.skip(reason="Mock server tests are disabled")
6868
@parametrize
6969
def test_method_profile(self, client: Supermemory) -> None:
7070
client_ = client.profile(
7171
container_tag="containerTag",
7272
)
7373
assert_matches_type(ProfileResponse, client_, path=["response"])
7474

75-
@pytest.mark.skip(reason="Prism tests are disabled")
75+
@pytest.mark.skip(reason="Mock server tests are disabled")
7676
@parametrize
7777
def test_method_profile_with_all_params(self, client: Supermemory) -> None:
7878
client_ = client.profile(
@@ -82,7 +82,7 @@ def test_method_profile_with_all_params(self, client: Supermemory) -> None:
8282
)
8383
assert_matches_type(ProfileResponse, client_, path=["response"])
8484

85-
@pytest.mark.skip(reason="Prism tests are disabled")
85+
@pytest.mark.skip(reason="Mock server tests are disabled")
8686
@parametrize
8787
def test_raw_response_profile(self, client: Supermemory) -> None:
8888
response = client.with_raw_response.profile(
@@ -94,7 +94,7 @@ def test_raw_response_profile(self, client: Supermemory) -> None:
9494
client_ = response.parse()
9595
assert_matches_type(ProfileResponse, client_, path=["response"])
9696

97-
@pytest.mark.skip(reason="Prism tests are disabled")
97+
@pytest.mark.skip(reason="Mock server tests are disabled")
9898
@parametrize
9999
def test_streaming_response_profile(self, client: Supermemory) -> None:
100100
with client.with_streaming_response.profile(
@@ -114,15 +114,15 @@ class TestAsyncClient:
114114
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
115115
)
116116

117-
@pytest.mark.skip(reason="Prism tests are disabled")
117+
@pytest.mark.skip(reason="Mock server tests are disabled")
118118
@parametrize
119119
async def test_method_add(self, async_client: AsyncSupermemory) -> None:
120120
client = await async_client.add(
121121
content="content",
122122
)
123123
assert_matches_type(AddResponse, client, path=["response"])
124124

125-
@pytest.mark.skip(reason="Prism tests are disabled")
125+
@pytest.mark.skip(reason="Mock server tests are disabled")
126126
@parametrize
127127
async def test_method_add_with_all_params(self, async_client: AsyncSupermemory) -> None:
128128
client = await async_client.add(
@@ -135,7 +135,7 @@ async def test_method_add_with_all_params(self, async_client: AsyncSupermemory)
135135
)
136136
assert_matches_type(AddResponse, client, path=["response"])
137137

138-
@pytest.mark.skip(reason="Prism tests are disabled")
138+
@pytest.mark.skip(reason="Mock server tests are disabled")
139139
@parametrize
140140
async def test_raw_response_add(self, async_client: AsyncSupermemory) -> None:
141141
response = await async_client.with_raw_response.add(
@@ -147,7 +147,7 @@ async def test_raw_response_add(self, async_client: AsyncSupermemory) -> None:
147147
client = await response.parse()
148148
assert_matches_type(AddResponse, client, path=["response"])
149149

150-
@pytest.mark.skip(reason="Prism tests are disabled")
150+
@pytest.mark.skip(reason="Mock server tests are disabled")
151151
@parametrize
152152
async def test_streaming_response_add(self, async_client: AsyncSupermemory) -> None:
153153
async with async_client.with_streaming_response.add(
@@ -161,15 +161,15 @@ async def test_streaming_response_add(self, async_client: AsyncSupermemory) -> N
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
async def test_method_profile(self, async_client: AsyncSupermemory) -> None:
167167
client = await async_client.profile(
168168
container_tag="containerTag",
169169
)
170170
assert_matches_type(ProfileResponse, client, 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_method_profile_with_all_params(self, async_client: AsyncSupermemory) -> None:
175175
client = await async_client.profile(
@@ -179,7 +179,7 @@ async def test_method_profile_with_all_params(self, async_client: AsyncSupermemo
179179
)
180180
assert_matches_type(ProfileResponse, client, 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_raw_response_profile(self, async_client: AsyncSupermemory) -> None:
185185
response = await async_client.with_raw_response.profile(
@@ -191,7 +191,7 @@ async def test_raw_response_profile(self, async_client: AsyncSupermemory) -> Non
191191
client = await response.parse()
192192
assert_matches_type(ProfileResponse, client, path=["response"])
193193

194-
@pytest.mark.skip(reason="Prism tests are disabled")
194+
@pytest.mark.skip(reason="Mock server tests are disabled")
195195
@parametrize
196196
async def test_streaming_response_profile(self, async_client: AsyncSupermemory) -> None:
197197
async with async_client.with_streaming_response.profile(

0 commit comments

Comments
 (0)