Skip to content

Commit 4b7594f

Browse files
chore: update mock server docs
1 parent 02c10f5 commit 4b7594f

7 files changed

Lines changed: 90 additions & 97 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_available.py‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
class TestAvailable:
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: Brapi) -> None:
2323
available = client.available.list()
2424
assert_matches_type(AvailableListResponse, available, 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_method_list_with_all_params(self, client: Brapi) -> None:
2929
available = client.available.list(
@@ -32,7 +32,7 @@ def test_method_list_with_all_params(self, client: Brapi) -> None:
3232
)
3333
assert_matches_type(AvailableListResponse, available, path=["response"])
3434

35-
@pytest.mark.skip(reason="Prism tests are disabled")
35+
@pytest.mark.skip(reason="Mock server tests are disabled")
3636
@parametrize
3737
def test_raw_response_list(self, client: Brapi) -> None:
3838
response = client.available.with_raw_response.list()
@@ -42,7 +42,7 @@ def test_raw_response_list(self, client: Brapi) -> None:
4242
available = response.parse()
4343
assert_matches_type(AvailableListResponse, available, path=["response"])
4444

45-
@pytest.mark.skip(reason="Prism tests are disabled")
45+
@pytest.mark.skip(reason="Mock server tests are disabled")
4646
@parametrize
4747
def test_streaming_response_list(self, client: Brapi) -> None:
4848
with client.available.with_streaming_response.list() as response:
@@ -60,13 +60,13 @@ class TestAsyncAvailable:
6060
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
6161
)
6262

63-
@pytest.mark.skip(reason="Prism tests are disabled")
63+
@pytest.mark.skip(reason="Mock server tests are disabled")
6464
@parametrize
6565
async def test_method_list(self, async_client: AsyncBrapi) -> None:
6666
available = await async_client.available.list()
6767
assert_matches_type(AvailableListResponse, available, 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
async def test_method_list_with_all_params(self, async_client: AsyncBrapi) -> None:
7272
available = await async_client.available.list(
@@ -75,7 +75,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncBrapi) -> No
7575
)
7676
assert_matches_type(AvailableListResponse, available, path=["response"])
7777

78-
@pytest.mark.skip(reason="Prism tests are disabled")
78+
@pytest.mark.skip(reason="Mock server tests are disabled")
7979
@parametrize
8080
async def test_raw_response_list(self, async_client: AsyncBrapi) -> None:
8181
response = await async_client.available.with_raw_response.list()
@@ -85,7 +85,7 @@ async def test_raw_response_list(self, async_client: AsyncBrapi) -> None:
8585
available = await response.parse()
8686
assert_matches_type(AvailableListResponse, available, 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_list(self, async_client: AsyncBrapi) -> None:
9191
async with async_client.available.with_streaming_response.list() as response:

‎tests/api_resources/test_quote.py‎

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717
class TestQuote:
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: Brapi) -> None:
2323
quote = client.quote.retrieve(
2424
tickers="PETR4,MGLU3",
2525
)
2626
assert_matches_type(QuoteRetrieveResponse, quote, 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_retrieve_with_all_params(self, client: Brapi) -> None:
3131
quote = client.quote.retrieve(
@@ -39,7 +39,7 @@ def test_method_retrieve_with_all_params(self, client: Brapi) -> None:
3939
)
4040
assert_matches_type(QuoteRetrieveResponse, quote, path=["response"])
4141

42-
@pytest.mark.skip(reason="Prism tests are disabled")
42+
@pytest.mark.skip(reason="Mock server tests are disabled")
4343
@parametrize
4444
def test_raw_response_retrieve(self, client: Brapi) -> None:
4545
response = client.quote.with_raw_response.retrieve(
@@ -51,7 +51,7 @@ def test_raw_response_retrieve(self, client: Brapi) -> None:
5151
quote = response.parse()
5252
assert_matches_type(QuoteRetrieveResponse, quote, path=["response"])
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_streaming_response_retrieve(self, client: Brapi) -> None:
5757
with client.quote.with_streaming_response.retrieve(
@@ -65,21 +65,21 @@ def test_streaming_response_retrieve(self, client: Brapi) -> None:
6565

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

68-
@pytest.mark.skip(reason="Prism tests are disabled")
68+
@pytest.mark.skip(reason="Mock server tests are disabled")
6969
@parametrize
7070
def test_path_params_retrieve(self, client: Brapi) -> None:
7171
with pytest.raises(ValueError, match=r"Expected a non-empty value for `tickers` but received ''"):
7272
client.quote.with_raw_response.retrieve(
7373
tickers="",
7474
)
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_list(self, client: Brapi) -> None:
7979
quote = client.quote.list()
8080
assert_matches_type(QuoteListResponse, quote, 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_list_with_all_params(self, client: Brapi) -> None:
8585
quote = client.quote.list(
@@ -94,7 +94,7 @@ def test_method_list_with_all_params(self, client: Brapi) -> None:
9494
)
9595
assert_matches_type(QuoteListResponse, quote, 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_raw_response_list(self, client: Brapi) -> None:
100100
response = client.quote.with_raw_response.list()
@@ -104,7 +104,7 @@ def test_raw_response_list(self, client: Brapi) -> None:
104104
quote = response.parse()
105105
assert_matches_type(QuoteListResponse, quote, path=["response"])
106106

107-
@pytest.mark.skip(reason="Prism tests are disabled")
107+
@pytest.mark.skip(reason="Mock server tests are disabled")
108108
@parametrize
109109
def test_streaming_response_list(self, client: Brapi) -> None:
110110
with client.quote.with_streaming_response.list() as response:
@@ -122,15 +122,15 @@ class TestAsyncQuote:
122122
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
123123
)
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_retrieve(self, async_client: AsyncBrapi) -> None:
128128
quote = await async_client.quote.retrieve(
129129
tickers="PETR4,MGLU3",
130130
)
131131
assert_matches_type(QuoteRetrieveResponse, quote, path=["response"])
132132

133-
@pytest.mark.skip(reason="Prism tests are disabled")
133+
@pytest.mark.skip(reason="Mock server tests are disabled")
134134
@parametrize
135135
async def test_method_retrieve_with_all_params(self, async_client: AsyncBrapi) -> None:
136136
quote = await async_client.quote.retrieve(
@@ -144,7 +144,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncBrapi) -
144144
)
145145
assert_matches_type(QuoteRetrieveResponse, quote, 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_raw_response_retrieve(self, async_client: AsyncBrapi) -> None:
150150
response = await async_client.quote.with_raw_response.retrieve(
@@ -156,7 +156,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncBrapi) -> None:
156156
quote = await response.parse()
157157
assert_matches_type(QuoteRetrieveResponse, quote, path=["response"])
158158

159-
@pytest.mark.skip(reason="Prism tests are disabled")
159+
@pytest.mark.skip(reason="Mock server tests are disabled")
160160
@parametrize
161161
async def test_streaming_response_retrieve(self, async_client: AsyncBrapi) -> None:
162162
async with async_client.quote.with_streaming_response.retrieve(
@@ -170,21 +170,21 @@ async def test_streaming_response_retrieve(self, async_client: AsyncBrapi) -> No
170170

171171
assert cast(Any, response.is_closed) is True
172172

173-
@pytest.mark.skip(reason="Prism tests are disabled")
173+
@pytest.mark.skip(reason="Mock server tests are disabled")
174174
@parametrize
175175
async def test_path_params_retrieve(self, async_client: AsyncBrapi) -> None:
176176
with pytest.raises(ValueError, match=r"Expected a non-empty value for `tickers` but received ''"):
177177
await async_client.quote.with_raw_response.retrieve(
178178
tickers="",
179179
)
180180

181-
@pytest.mark.skip(reason="Prism tests are disabled")
181+
@pytest.mark.skip(reason="Mock server tests are disabled")
182182
@parametrize
183183
async def test_method_list(self, async_client: AsyncBrapi) -> None:
184184
quote = await async_client.quote.list()
185185
assert_matches_type(QuoteListResponse, quote, 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_method_list_with_all_params(self, async_client: AsyncBrapi) -> None:
190190
quote = await async_client.quote.list(
@@ -199,7 +199,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncBrapi) -> No
199199
)
200200
assert_matches_type(QuoteListResponse, quote, path=["response"])
201201

202-
@pytest.mark.skip(reason="Prism tests are disabled")
202+
@pytest.mark.skip(reason="Mock server tests are disabled")
203203
@parametrize
204204
async def test_raw_response_list(self, async_client: AsyncBrapi) -> None:
205205
response = await async_client.quote.with_raw_response.list()
@@ -209,7 +209,7 @@ async def test_raw_response_list(self, async_client: AsyncBrapi) -> None:
209209
quote = await response.parse()
210210
assert_matches_type(QuoteListResponse, quote, path=["response"])
211211

212-
@pytest.mark.skip(reason="Prism tests are disabled")
212+
@pytest.mark.skip(reason="Mock server tests are disabled")
213213
@parametrize
214214
async def test_streaming_response_list(self, async_client: AsyncBrapi) -> None:
215215
async with async_client.quote.with_streaming_response.list() as response:

‎tests/api_resources/v2/test_crypto.py‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020
class TestCrypto:
2121
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
2222

23-
@pytest.mark.skip(reason="Prism tests are disabled")
23+
@pytest.mark.skip(reason="Mock server tests are disabled")
2424
@parametrize
2525
def test_method_retrieve(self, client: Brapi) -> None:
2626
crypto = client.v2.crypto.retrieve(
2727
coin="coin",
2828
)
2929
assert_matches_type(CryptoRetrieveResponse, crypto, path=["response"])
3030

31-
@pytest.mark.skip(reason="Prism tests are disabled")
31+
@pytest.mark.skip(reason="Mock server tests are disabled")
3232
@parametrize
3333
def test_method_retrieve_with_all_params(self, client: Brapi) -> None:
3434
crypto = client.v2.crypto.retrieve(
@@ -40,7 +40,7 @@ def test_method_retrieve_with_all_params(self, client: Brapi) -> None:
4040
)
4141
assert_matches_type(CryptoRetrieveResponse, crypto, path=["response"])
4242

43-
@pytest.mark.skip(reason="Prism tests are disabled")
43+
@pytest.mark.skip(reason="Mock server tests are disabled")
4444
@parametrize
4545
def test_raw_response_retrieve(self, client: Brapi) -> None:
4646
response = client.v2.crypto.with_raw_response.retrieve(
@@ -52,7 +52,7 @@ def test_raw_response_retrieve(self, client: Brapi) -> None:
5252
crypto = response.parse()
5353
assert_matches_type(CryptoRetrieveResponse, crypto, 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_retrieve(self, client: Brapi) -> None:
5858
with client.v2.crypto.with_streaming_response.retrieve(
@@ -66,13 +66,13 @@ def test_streaming_response_retrieve(self, client: Brapi) -> None:
6666

6767
assert cast(Any, response.is_closed) is True
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_available(self, client: Brapi) -> None:
7272
crypto = client.v2.crypto.list_available()
7373
assert_matches_type(CryptoListAvailableResponse, crypto, 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_list_available_with_all_params(self, client: Brapi) -> None:
7878
crypto = client.v2.crypto.list_available(
@@ -81,7 +81,7 @@ def test_method_list_available_with_all_params(self, client: Brapi) -> None:
8181
)
8282
assert_matches_type(CryptoListAvailableResponse, crypto, path=["response"])
8383

84-
@pytest.mark.skip(reason="Prism tests are disabled")
84+
@pytest.mark.skip(reason="Mock server tests are disabled")
8585
@parametrize
8686
def test_raw_response_list_available(self, client: Brapi) -> None:
8787
response = client.v2.crypto.with_raw_response.list_available()
@@ -91,7 +91,7 @@ def test_raw_response_list_available(self, client: Brapi) -> None:
9191
crypto = response.parse()
9292
assert_matches_type(CryptoListAvailableResponse, crypto, path=["response"])
9393

94-
@pytest.mark.skip(reason="Prism tests are disabled")
94+
@pytest.mark.skip(reason="Mock server tests are disabled")
9595
@parametrize
9696
def test_streaming_response_list_available(self, client: Brapi) -> None:
9797
with client.v2.crypto.with_streaming_response.list_available() as response:
@@ -109,15 +109,15 @@ class TestAsyncCrypto:
109109
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
110110
)
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_method_retrieve(self, async_client: AsyncBrapi) -> None:
115115
crypto = await async_client.v2.crypto.retrieve(
116116
coin="coin",
117117
)
118118
assert_matches_type(CryptoRetrieveResponse, crypto, path=["response"])
119119

120-
@pytest.mark.skip(reason="Prism tests are disabled")
120+
@pytest.mark.skip(reason="Mock server tests are disabled")
121121
@parametrize
122122
async def test_method_retrieve_with_all_params(self, async_client: AsyncBrapi) -> None:
123123
crypto = await async_client.v2.crypto.retrieve(
@@ -129,7 +129,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncBrapi) -
129129
)
130130
assert_matches_type(CryptoRetrieveResponse, crypto, path=["response"])
131131

132-
@pytest.mark.skip(reason="Prism tests are disabled")
132+
@pytest.mark.skip(reason="Mock server tests are disabled")
133133
@parametrize
134134
async def test_raw_response_retrieve(self, async_client: AsyncBrapi) -> None:
135135
response = await async_client.v2.crypto.with_raw_response.retrieve(
@@ -141,7 +141,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncBrapi) -> None:
141141
crypto = await response.parse()
142142
assert_matches_type(CryptoRetrieveResponse, crypto, path=["response"])
143143

144-
@pytest.mark.skip(reason="Prism tests are disabled")
144+
@pytest.mark.skip(reason="Mock server tests are disabled")
145145
@parametrize
146146
async def test_streaming_response_retrieve(self, async_client: AsyncBrapi) -> None:
147147
async with async_client.v2.crypto.with_streaming_response.retrieve(
@@ -155,13 +155,13 @@ async def test_streaming_response_retrieve(self, async_client: AsyncBrapi) -> No
155155

156156
assert cast(Any, response.is_closed) is True
157157

158-
@pytest.mark.skip(reason="Prism tests are disabled")
158+
@pytest.mark.skip(reason="Mock server tests are disabled")
159159
@parametrize
160160
async def test_method_list_available(self, async_client: AsyncBrapi) -> None:
161161
crypto = await async_client.v2.crypto.list_available()
162162
assert_matches_type(CryptoListAvailableResponse, crypto, path=["response"])
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_list_available_with_all_params(self, async_client: AsyncBrapi) -> None:
167167
crypto = await async_client.v2.crypto.list_available(
@@ -170,7 +170,7 @@ async def test_method_list_available_with_all_params(self, async_client: AsyncBr
170170
)
171171
assert_matches_type(CryptoListAvailableResponse, crypto, path=["response"])
172172

173-
@pytest.mark.skip(reason="Prism tests are disabled")
173+
@pytest.mark.skip(reason="Mock server tests are disabled")
174174
@parametrize
175175
async def test_raw_response_list_available(self, async_client: AsyncBrapi) -> None:
176176
response = await async_client.v2.crypto.with_raw_response.list_available()
@@ -180,7 +180,7 @@ async def test_raw_response_list_available(self, async_client: AsyncBrapi) -> No
180180
crypto = await response.parse()
181181
assert_matches_type(CryptoListAvailableResponse, crypto, path=["response"])
182182

183-
@pytest.mark.skip(reason="Prism tests are disabled")
183+
@pytest.mark.skip(reason="Mock server tests are disabled")
184184
@parametrize
185185
async def test_streaming_response_list_available(self, async_client: AsyncBrapi) -> None:
186186
async with async_client.v2.crypto.with_streaming_response.list_available() as response:

0 commit comments

Comments
 (0)