Skip to content

Commit f0c9141

Browse files
chore: update mock server docs
1 parent 7487832 commit f0c9141

5 files changed

Lines changed: 38 additions & 45 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/test_feedback.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
class TestFeedback:
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_submit(self, client: Rollin) -> None:
2323
feedback = client.feedback.submit(
@@ -27,7 +27,7 @@ def test_method_submit(self, client: Rollin) -> None:
2727
)
2828
assert_matches_type(FeedbackSubmitResponse, feedback, path=["response"])
2929

30-
@pytest.mark.skip(reason="Prism tests are disabled")
30+
@pytest.mark.skip(reason="Mock server tests are disabled")
3131
@parametrize
3232
def test_method_submit_with_all_params(self, client: Rollin) -> None:
3333
feedback = client.feedback.submit(
@@ -38,7 +38,7 @@ def test_method_submit_with_all_params(self, client: Rollin) -> None:
3838
)
3939
assert_matches_type(FeedbackSubmitResponse, feedback, 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_submit(self, client: Rollin) -> None:
4444
response = client.feedback.with_raw_response.submit(
@@ -52,7 +52,7 @@ def test_raw_response_submit(self, client: Rollin) -> None:
5252
feedback = response.parse()
5353
assert_matches_type(FeedbackSubmitResponse, feedback, 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_submit(self, client: Rollin) -> None:
5858
with client.feedback.with_streaming_response.submit(
@@ -74,7 +74,7 @@ class TestAsyncFeedback:
7474
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
7575
)
7676

77-
@pytest.mark.skip(reason="Prism tests are disabled")
77+
@pytest.mark.skip(reason="Mock server tests are disabled")
7878
@parametrize
7979
async def test_method_submit(self, async_client: AsyncRollin) -> None:
8080
feedback = await async_client.feedback.submit(
@@ -84,7 +84,7 @@ async def test_method_submit(self, async_client: AsyncRollin) -> None:
8484
)
8585
assert_matches_type(FeedbackSubmitResponse, feedback, path=["response"])
8686

87-
@pytest.mark.skip(reason="Prism tests are disabled")
87+
@pytest.mark.skip(reason="Mock server tests are disabled")
8888
@parametrize
8989
async def test_method_submit_with_all_params(self, async_client: AsyncRollin) -> None:
9090
feedback = await async_client.feedback.submit(
@@ -95,7 +95,7 @@ async def test_method_submit_with_all_params(self, async_client: AsyncRollin) ->
9595
)
9696
assert_matches_type(FeedbackSubmitResponse, feedback, path=["response"])
9797

98-
@pytest.mark.skip(reason="Prism tests are disabled")
98+
@pytest.mark.skip(reason="Mock server tests are disabled")
9999
@parametrize
100100
async def test_raw_response_submit(self, async_client: AsyncRollin) -> None:
101101
response = await async_client.feedback.with_raw_response.submit(
@@ -109,7 +109,7 @@ async def test_raw_response_submit(self, async_client: AsyncRollin) -> None:
109109
feedback = await response.parse()
110110
assert_matches_type(FeedbackSubmitResponse, feedback, path=["response"])
111111

112-
@pytest.mark.skip(reason="Prism tests are disabled")
112+
@pytest.mark.skip(reason="Mock server tests are disabled")
113113
@parametrize
114114
async def test_streaming_response_submit(self, async_client: AsyncRollin) -> None:
115115
async with async_client.feedback.with_streaming_response.submit(

tests/api_resources/test_locations.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@
1818
class TestLocations:
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: Rollin) -> None:
2424
location = client.locations.retrieve(
2525
"id",
2626
)
2727
assert_matches_type(LocationRetrieveResponse, location, 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: Rollin) -> None:
3232
response = client.locations.with_raw_response.retrieve(
@@ -38,7 +38,7 @@ def test_raw_response_retrieve(self, client: Rollin) -> None:
3838
location = response.parse()
3939
assert_matches_type(LocationRetrieveResponse, location, 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: Rollin) -> None:
4444
with client.locations.with_streaming_response.retrieve(
@@ -52,15 +52,15 @@ def test_streaming_response_retrieve(self, client: Rollin) -> 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: Rollin) -> None:
5858
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
5959
client.locations.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: Rollin) -> None:
6666
location = client.locations.list(
@@ -69,7 +69,7 @@ def test_method_list(self, client: Rollin) -> None:
6969
)
7070
assert_matches_type(SyncCursorPagination[LocationListResponse], location, path=["response"])
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_list_with_all_params(self, client: Rollin) -> None:
7575
location = client.locations.list(
@@ -84,7 +84,7 @@ def test_method_list_with_all_params(self, client: Rollin) -> None:
8484
)
8585
assert_matches_type(SyncCursorPagination[LocationListResponse], location, path=["response"])
8686

87-
@pytest.mark.skip(reason="Prism tests are disabled")
87+
@pytest.mark.skip(reason="Mock server tests are disabled")
8888
@parametrize
8989
def test_raw_response_list(self, client: Rollin) -> None:
9090
response = client.locations.with_raw_response.list(
@@ -97,7 +97,7 @@ def test_raw_response_list(self, client: Rollin) -> None:
9797
location = response.parse()
9898
assert_matches_type(SyncCursorPagination[LocationListResponse], location, path=["response"])
9999

100-
@pytest.mark.skip(reason="Prism tests are disabled")
100+
@pytest.mark.skip(reason="Mock server tests are disabled")
101101
@parametrize
102102
def test_streaming_response_list(self, client: Rollin) -> None:
103103
with client.locations.with_streaming_response.list(
@@ -118,15 +118,15 @@ class TestAsyncLocations:
118118
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
119119
)
120120

121-
@pytest.mark.skip(reason="Prism tests are disabled")
121+
@pytest.mark.skip(reason="Mock server tests are disabled")
122122
@parametrize
123123
async def test_method_retrieve(self, async_client: AsyncRollin) -> None:
124124
location = await async_client.locations.retrieve(
125125
"id",
126126
)
127127
assert_matches_type(LocationRetrieveResponse, location, path=["response"])
128128

129-
@pytest.mark.skip(reason="Prism tests are disabled")
129+
@pytest.mark.skip(reason="Mock server tests are disabled")
130130
@parametrize
131131
async def test_raw_response_retrieve(self, async_client: AsyncRollin) -> None:
132132
response = await async_client.locations.with_raw_response.retrieve(
@@ -138,7 +138,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncRollin) -> None:
138138
location = await response.parse()
139139
assert_matches_type(LocationRetrieveResponse, location, path=["response"])
140140

141-
@pytest.mark.skip(reason="Prism tests are disabled")
141+
@pytest.mark.skip(reason="Mock server tests are disabled")
142142
@parametrize
143143
async def test_streaming_response_retrieve(self, async_client: AsyncRollin) -> None:
144144
async with async_client.locations.with_streaming_response.retrieve(
@@ -152,15 +152,15 @@ async def test_streaming_response_retrieve(self, async_client: AsyncRollin) -> N
152152

153153
assert cast(Any, response.is_closed) is True
154154

155-
@pytest.mark.skip(reason="Prism tests are disabled")
155+
@pytest.mark.skip(reason="Mock server tests are disabled")
156156
@parametrize
157157
async def test_path_params_retrieve(self, async_client: AsyncRollin) -> None:
158158
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
159159
await async_client.locations.with_raw_response.retrieve(
160160
"",
161161
)
162162

163-
@pytest.mark.skip(reason="Prism tests are disabled")
163+
@pytest.mark.skip(reason="Mock server tests are disabled")
164164
@parametrize
165165
async def test_method_list(self, async_client: AsyncRollin) -> None:
166166
location = await async_client.locations.list(
@@ -169,7 +169,7 @@ async def test_method_list(self, async_client: AsyncRollin) -> None:
169169
)
170170
assert_matches_type(AsyncCursorPagination[LocationListResponse], location, 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_list_with_all_params(self, async_client: AsyncRollin) -> None:
175175
location = await async_client.locations.list(
@@ -184,7 +184,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncRollin) -> N
184184
)
185185
assert_matches_type(AsyncCursorPagination[LocationListResponse], location, path=["response"])
186186

187-
@pytest.mark.skip(reason="Prism tests are disabled")
187+
@pytest.mark.skip(reason="Mock server tests are disabled")
188188
@parametrize
189189
async def test_raw_response_list(self, async_client: AsyncRollin) -> None:
190190
response = await async_client.locations.with_raw_response.list(
@@ -197,7 +197,7 @@ async def test_raw_response_list(self, async_client: AsyncRollin) -> None:
197197
location = await response.parse()
198198
assert_matches_type(AsyncCursorPagination[LocationListResponse], location, path=["response"])
199199

200-
@pytest.mark.skip(reason="Prism tests are disabled")
200+
@pytest.mark.skip(reason="Mock server tests are disabled")
201201
@parametrize
202202
async def test_streaming_response_list(self, async_client: AsyncRollin) -> None:
203203
async with async_client.locations.with_streaming_response.list(

tests/api_resources/test_regions.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
class TestRegions:
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_list(self, client: Rollin) -> None:
2323
region = client.regions.list()
2424
assert_matches_type(RegionListResponse, region, path=["response"])
2525

26-
@pytest.mark.skip(reason="Prism tests are disabled")
26+
@pytest.mark.skip(reason="Mock server tests are disabled")
2727
@parametrize
2828
def test_raw_response_list(self, client: Rollin) -> None:
2929
response = client.regions.with_raw_response.list()
@@ -33,7 +33,7 @@ def test_raw_response_list(self, client: Rollin) -> None:
3333
region = response.parse()
3434
assert_matches_type(RegionListResponse, region, 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_streaming_response_list(self, client: Rollin) -> None:
3939
with client.regions.with_streaming_response.list() as response:
@@ -51,13 +51,13 @@ class TestAsyncRegions:
5151
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
5252
)
5353

54-
@pytest.mark.skip(reason="Prism tests are disabled")
54+
@pytest.mark.skip(reason="Mock server tests are disabled")
5555
@parametrize
5656
async def test_method_list(self, async_client: AsyncRollin) -> None:
5757
region = await async_client.regions.list()
5858
assert_matches_type(RegionListResponse, region, path=["response"])
5959

60-
@pytest.mark.skip(reason="Prism tests are disabled")
60+
@pytest.mark.skip(reason="Mock server tests are disabled")
6161
@parametrize
6262
async def test_raw_response_list(self, async_client: AsyncRollin) -> None:
6363
response = await async_client.regions.with_raw_response.list()
@@ -67,7 +67,7 @@ async def test_raw_response_list(self, async_client: AsyncRollin) -> None:
6767
region = await response.parse()
6868
assert_matches_type(RegionListResponse, region, path=["response"])
6969

70-
@pytest.mark.skip(reason="Prism tests are disabled")
70+
@pytest.mark.skip(reason="Mock server tests are disabled")
7171
@parametrize
7272
async def test_streaming_response_list(self, async_client: AsyncRollin) -> None:
7373
async with async_client.regions.with_streaming_response.list() as response:

tests/api_resources/test_score.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717
class TestScore:
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_retrieve(self, client: Rollin) -> None:
2323
score = client.score.retrieve(
2424
"id",
2525
)
2626
assert_matches_type(ScoreRetrieveResponse, score, 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_raw_response_retrieve(self, client: Rollin) -> None:
3131
response = client.score.with_raw_response.retrieve(
@@ -37,7 +37,7 @@ def test_raw_response_retrieve(self, client: Rollin) -> None:
3737
score = response.parse()
3838
assert_matches_type(ScoreRetrieveResponse, score, path=["response"])
3939

40-
@pytest.mark.skip(reason="Prism tests are disabled")
40+
@pytest.mark.skip(reason="Mock server tests are disabled")
4141
@parametrize
4242
def test_streaming_response_retrieve(self, client: Rollin) -> None:
4343
with client.score.with_streaming_response.retrieve(
@@ -51,7 +51,7 @@ def test_streaming_response_retrieve(self, client: Rollin) -> None:
5151

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

54-
@pytest.mark.skip(reason="Prism tests are disabled")
54+
@pytest.mark.skip(reason="Mock server tests are disabled")
5555
@parametrize
5656
def test_path_params_retrieve(self, client: Rollin) -> None:
5757
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
@@ -65,15 +65,15 @@ class TestAsyncScore:
6565
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
6666
)
6767

68-
@pytest.mark.skip(reason="Prism tests are disabled")
68+
@pytest.mark.skip(reason="Mock server tests are disabled")
6969
@parametrize
7070
async def test_method_retrieve(self, async_client: AsyncRollin) -> None:
7171
score = await async_client.score.retrieve(
7272
"id",
7373
)
7474
assert_matches_type(ScoreRetrieveResponse, score, path=["response"])
7575

76-
@pytest.mark.skip(reason="Prism tests are disabled")
76+
@pytest.mark.skip(reason="Mock server tests are disabled")
7777
@parametrize
7878
async def test_raw_response_retrieve(self, async_client: AsyncRollin) -> None:
7979
response = await async_client.score.with_raw_response.retrieve(
@@ -85,7 +85,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncRollin) -> None:
8585
score = await response.parse()
8686
assert_matches_type(ScoreRetrieveResponse, score, path=["response"])
8787

88-
@pytest.mark.skip(reason="Prism tests are disabled")
88+
@pytest.mark.skip(reason="Mock server tests are disabled")
8989
@parametrize
9090
async def test_streaming_response_retrieve(self, async_client: AsyncRollin) -> None:
9191
async with async_client.score.with_streaming_response.retrieve(
@@ -99,7 +99,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncRollin) -> N
9999

100100
assert cast(Any, response.is_closed) is True
101101

102-
@pytest.mark.skip(reason="Prism tests are disabled")
102+
@pytest.mark.skip(reason="Mock server tests are disabled")
103103
@parametrize
104104
async def test_path_params_retrieve(self, async_client: AsyncRollin) -> None:
105105
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):

0 commit comments

Comments
 (0)