Skip to content

Commit d2942ae

Browse files
chore: update mock server docs
1 parent 582f64d commit d2942ae

File tree

13 files changed

+128
-135
lines changed

13 files changed

+128
-135
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/cdsl/test_fetch.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
class TestFetch:
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_request_otp(self, client: CasParser) -> None:
2626
fetch = client.cdsl.fetch.request_otp(
@@ -30,7 +30,7 @@ def test_method_request_otp(self, client: CasParser) -> None:
3030
)
3131
assert_matches_type(FetchRequestOtpResponse, fetch, 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_raw_response_request_otp(self, client: CasParser) -> None:
3636
response = client.cdsl.fetch.with_raw_response.request_otp(
@@ -44,7 +44,7 @@ def test_raw_response_request_otp(self, client: CasParser) -> None:
4444
fetch = response.parse()
4545
assert_matches_type(FetchRequestOtpResponse, fetch, path=["response"])
4646

47-
@pytest.mark.skip(reason="Prism tests are disabled")
47+
@pytest.mark.skip(reason="Mock server tests are disabled")
4848
@parametrize
4949
def test_streaming_response_request_otp(self, client: CasParser) -> None:
5050
with client.cdsl.fetch.with_streaming_response.request_otp(
@@ -60,7 +60,7 @@ def test_streaming_response_request_otp(self, client: CasParser) -> None:
6060

6161
assert cast(Any, response.is_closed) is True
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_verify_otp(self, client: CasParser) -> None:
6666
fetch = client.cdsl.fetch.verify_otp(
@@ -69,7 +69,7 @@ def test_method_verify_otp(self, client: CasParser) -> None:
6969
)
7070
assert_matches_type(FetchVerifyOtpResponse, fetch, 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_verify_otp_with_all_params(self, client: CasParser) -> None:
7575
fetch = client.cdsl.fetch.verify_otp(
@@ -79,7 +79,7 @@ def test_method_verify_otp_with_all_params(self, client: CasParser) -> None:
7979
)
8080
assert_matches_type(FetchVerifyOtpResponse, fetch, 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_raw_response_verify_otp(self, client: CasParser) -> None:
8585
response = client.cdsl.fetch.with_raw_response.verify_otp(
@@ -92,7 +92,7 @@ def test_raw_response_verify_otp(self, client: CasParser) -> None:
9292
fetch = response.parse()
9393
assert_matches_type(FetchVerifyOtpResponse, fetch, path=["response"])
9494

95-
@pytest.mark.skip(reason="Prism tests are disabled")
95+
@pytest.mark.skip(reason="Mock server tests are disabled")
9696
@parametrize
9797
def test_streaming_response_verify_otp(self, client: CasParser) -> None:
9898
with client.cdsl.fetch.with_streaming_response.verify_otp(
@@ -107,7 +107,7 @@ def test_streaming_response_verify_otp(self, client: CasParser) -> None:
107107

108108
assert cast(Any, response.is_closed) is True
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_path_params_verify_otp(self, client: CasParser) -> None:
113113
with pytest.raises(ValueError, match=r"Expected a non-empty value for `session_id` but received ''"):
@@ -122,7 +122,7 @@ class TestAsyncFetch:
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_request_otp(self, async_client: AsyncCasParser) -> None:
128128
fetch = await async_client.cdsl.fetch.request_otp(
@@ -132,7 +132,7 @@ async def test_method_request_otp(self, async_client: AsyncCasParser) -> None:
132132
)
133133
assert_matches_type(FetchRequestOtpResponse, fetch, path=["response"])
134134

135-
@pytest.mark.skip(reason="Prism tests are disabled")
135+
@pytest.mark.skip(reason="Mock server tests are disabled")
136136
@parametrize
137137
async def test_raw_response_request_otp(self, async_client: AsyncCasParser) -> None:
138138
response = await async_client.cdsl.fetch.with_raw_response.request_otp(
@@ -146,7 +146,7 @@ async def test_raw_response_request_otp(self, async_client: AsyncCasParser) -> N
146146
fetch = await response.parse()
147147
assert_matches_type(FetchRequestOtpResponse, fetch, path=["response"])
148148

149-
@pytest.mark.skip(reason="Prism tests are disabled")
149+
@pytest.mark.skip(reason="Mock server tests are disabled")
150150
@parametrize
151151
async def test_streaming_response_request_otp(self, async_client: AsyncCasParser) -> None:
152152
async with async_client.cdsl.fetch.with_streaming_response.request_otp(
@@ -162,7 +162,7 @@ async def test_streaming_response_request_otp(self, async_client: AsyncCasParser
162162

163163
assert cast(Any, response.is_closed) is True
164164

165-
@pytest.mark.skip(reason="Prism tests are disabled")
165+
@pytest.mark.skip(reason="Mock server tests are disabled")
166166
@parametrize
167167
async def test_method_verify_otp(self, async_client: AsyncCasParser) -> None:
168168
fetch = await async_client.cdsl.fetch.verify_otp(
@@ -171,7 +171,7 @@ async def test_method_verify_otp(self, async_client: AsyncCasParser) -> None:
171171
)
172172
assert_matches_type(FetchVerifyOtpResponse, fetch, path=["response"])
173173

174-
@pytest.mark.skip(reason="Prism tests are disabled")
174+
@pytest.mark.skip(reason="Mock server tests are disabled")
175175
@parametrize
176176
async def test_method_verify_otp_with_all_params(self, async_client: AsyncCasParser) -> None:
177177
fetch = await async_client.cdsl.fetch.verify_otp(
@@ -181,7 +181,7 @@ async def test_method_verify_otp_with_all_params(self, async_client: AsyncCasPar
181181
)
182182
assert_matches_type(FetchVerifyOtpResponse, fetch, path=["response"])
183183

184-
@pytest.mark.skip(reason="Prism tests are disabled")
184+
@pytest.mark.skip(reason="Mock server tests are disabled")
185185
@parametrize
186186
async def test_raw_response_verify_otp(self, async_client: AsyncCasParser) -> None:
187187
response = await async_client.cdsl.fetch.with_raw_response.verify_otp(
@@ -194,7 +194,7 @@ async def test_raw_response_verify_otp(self, async_client: AsyncCasParser) -> No
194194
fetch = await response.parse()
195195
assert_matches_type(FetchVerifyOtpResponse, fetch, path=["response"])
196196

197-
@pytest.mark.skip(reason="Prism tests are disabled")
197+
@pytest.mark.skip(reason="Mock server tests are disabled")
198198
@parametrize
199199
async def test_streaming_response_verify_otp(self, async_client: AsyncCasParser) -> None:
200200
async with async_client.cdsl.fetch.with_streaming_response.verify_otp(
@@ -209,7 +209,7 @@ async def test_streaming_response_verify_otp(self, async_client: AsyncCasParser)
209209

210210
assert cast(Any, response.is_closed) is True
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_path_params_verify_otp(self, async_client: AsyncCasParser) -> None:
215215
with pytest.raises(ValueError, match=r"Expected a non-empty value for `session_id` but received ''"):

tests/api_resources/test_access_token.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@
1717
class TestAccessToken:
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_create(self, client: CasParser) -> None:
2323
access_token = client.access_token.create()
2424
assert_matches_type(AccessTokenCreateResponse, access_token, 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_create_with_all_params(self, client: CasParser) -> None:
2929
access_token = client.access_token.create(
3030
expiry_minutes=60,
3131
)
3232
assert_matches_type(AccessTokenCreateResponse, access_token, path=["response"])
3333

34-
@pytest.mark.skip(reason="Prism tests are disabled")
34+
@pytest.mark.skip(reason="Mock server tests are disabled")
3535
@parametrize
3636
def test_raw_response_create(self, client: CasParser) -> None:
3737
response = client.access_token.with_raw_response.create()
@@ -41,7 +41,7 @@ def test_raw_response_create(self, client: CasParser) -> None:
4141
access_token = response.parse()
4242
assert_matches_type(AccessTokenCreateResponse, access_token, path=["response"])
4343

44-
@pytest.mark.skip(reason="Prism tests are disabled")
44+
@pytest.mark.skip(reason="Mock server tests are disabled")
4545
@parametrize
4646
def test_streaming_response_create(self, client: CasParser) -> None:
4747
with client.access_token.with_streaming_response.create() as response:
@@ -59,21 +59,21 @@ class TestAsyncAccessToken:
5959
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
6060
)
6161

62-
@pytest.mark.skip(reason="Prism tests are disabled")
62+
@pytest.mark.skip(reason="Mock server tests are disabled")
6363
@parametrize
6464
async def test_method_create(self, async_client: AsyncCasParser) -> None:
6565
access_token = await async_client.access_token.create()
6666
assert_matches_type(AccessTokenCreateResponse, access_token, path=["response"])
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_create_with_all_params(self, async_client: AsyncCasParser) -> None:
7171
access_token = await async_client.access_token.create(
7272
expiry_minutes=60,
7373
)
7474
assert_matches_type(AccessTokenCreateResponse, access_token, 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_create(self, async_client: AsyncCasParser) -> None:
7979
response = await async_client.access_token.with_raw_response.create()
@@ -83,7 +83,7 @@ async def test_raw_response_create(self, async_client: AsyncCasParser) -> None:
8383
access_token = await response.parse()
8484
assert_matches_type(AccessTokenCreateResponse, access_token, path=["response"])
8585

86-
@pytest.mark.skip(reason="Prism tests are disabled")
86+
@pytest.mark.skip(reason="Mock server tests are disabled")
8787
@parametrize
8888
async def test_streaming_response_create(self, async_client: AsyncCasParser) -> None:
8989
async with async_client.access_token.with_streaming_response.create() as response:

tests/api_resources/test_cams_kfintech.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
class TestCamsKfintech:
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_parse(self, client: CasParser) -> None:
2323
cams_kfintech = client.cams_kfintech.parse()
2424
assert_matches_type(UnifiedResponse, cams_kfintech, 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_parse_with_all_params(self, client: CasParser) -> None:
2929
cams_kfintech = client.cams_kfintech.parse(
@@ -33,7 +33,7 @@ def test_method_parse_with_all_params(self, client: CasParser) -> None:
3333
)
3434
assert_matches_type(UnifiedResponse, cams_kfintech, 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_parse(self, client: CasParser) -> None:
3939
response = client.cams_kfintech.with_raw_response.parse()
@@ -43,7 +43,7 @@ def test_raw_response_parse(self, client: CasParser) -> None:
4343
cams_kfintech = response.parse()
4444
assert_matches_type(UnifiedResponse, cams_kfintech, 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_streaming_response_parse(self, client: CasParser) -> None:
4949
with client.cams_kfintech.with_streaming_response.parse() as response:
@@ -61,13 +61,13 @@ class TestAsyncCamsKfintech:
6161
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
6262
)
6363

64-
@pytest.mark.skip(reason="Prism tests are disabled")
64+
@pytest.mark.skip(reason="Mock server tests are disabled")
6565
@parametrize
6666
async def test_method_parse(self, async_client: AsyncCasParser) -> None:
6767
cams_kfintech = await async_client.cams_kfintech.parse()
6868
assert_matches_type(UnifiedResponse, cams_kfintech, 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_method_parse_with_all_params(self, async_client: AsyncCasParser) -> None:
7373
cams_kfintech = await async_client.cams_kfintech.parse(
@@ -77,7 +77,7 @@ async def test_method_parse_with_all_params(self, async_client: AsyncCasParser)
7777
)
7878
assert_matches_type(UnifiedResponse, cams_kfintech, path=["response"])
7979

80-
@pytest.mark.skip(reason="Prism tests are disabled")
80+
@pytest.mark.skip(reason="Mock server tests are disabled")
8181
@parametrize
8282
async def test_raw_response_parse(self, async_client: AsyncCasParser) -> None:
8383
response = await async_client.cams_kfintech.with_raw_response.parse()
@@ -87,7 +87,7 @@ async def test_raw_response_parse(self, async_client: AsyncCasParser) -> None:
8787
cams_kfintech = await response.parse()
8888
assert_matches_type(UnifiedResponse, cams_kfintech, path=["response"])
8989

90-
@pytest.mark.skip(reason="Prism tests are disabled")
90+
@pytest.mark.skip(reason="Mock server tests are disabled")
9191
@parametrize
9292
async def test_streaming_response_parse(self, async_client: AsyncCasParser) -> None:
9393
async with async_client.cams_kfintech.with_streaming_response.parse() as response:

tests/api_resources/test_cdsl.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
class TestCdsl:
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_parse_pdf(self, client: CasParser) -> None:
2323
cdsl = client.cdsl.parse_pdf()
2424
assert_matches_type(UnifiedResponse, cdsl, 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_parse_pdf_with_all_params(self, client: CasParser) -> None:
2929
cdsl = client.cdsl.parse_pdf(
@@ -33,7 +33,7 @@ def test_method_parse_pdf_with_all_params(self, client: CasParser) -> None:
3333
)
3434
assert_matches_type(UnifiedResponse, cdsl, 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_parse_pdf(self, client: CasParser) -> None:
3939
response = client.cdsl.with_raw_response.parse_pdf()
@@ -43,7 +43,7 @@ def test_raw_response_parse_pdf(self, client: CasParser) -> None:
4343
cdsl = response.parse()
4444
assert_matches_type(UnifiedResponse, cdsl, 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_streaming_response_parse_pdf(self, client: CasParser) -> None:
4949
with client.cdsl.with_streaming_response.parse_pdf() as response:
@@ -61,13 +61,13 @@ class TestAsyncCdsl:
6161
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
6262
)
6363

64-
@pytest.mark.skip(reason="Prism tests are disabled")
64+
@pytest.mark.skip(reason="Mock server tests are disabled")
6565
@parametrize
6666
async def test_method_parse_pdf(self, async_client: AsyncCasParser) -> None:
6767
cdsl = await async_client.cdsl.parse_pdf()
6868
assert_matches_type(UnifiedResponse, cdsl, 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_method_parse_pdf_with_all_params(self, async_client: AsyncCasParser) -> None:
7373
cdsl = await async_client.cdsl.parse_pdf(
@@ -77,7 +77,7 @@ async def test_method_parse_pdf_with_all_params(self, async_client: AsyncCasPars
7777
)
7878
assert_matches_type(UnifiedResponse, cdsl, path=["response"])
7979

80-
@pytest.mark.skip(reason="Prism tests are disabled")
80+
@pytest.mark.skip(reason="Mock server tests are disabled")
8181
@parametrize
8282
async def test_raw_response_parse_pdf(self, async_client: AsyncCasParser) -> None:
8383
response = await async_client.cdsl.with_raw_response.parse_pdf()
@@ -87,7 +87,7 @@ async def test_raw_response_parse_pdf(self, async_client: AsyncCasParser) -> Non
8787
cdsl = await response.parse()
8888
assert_matches_type(UnifiedResponse, cdsl, path=["response"])
8989

90-
@pytest.mark.skip(reason="Prism tests are disabled")
90+
@pytest.mark.skip(reason="Mock server tests are disabled")
9191
@parametrize
9292
async def test_streaming_response_parse_pdf(self, async_client: AsyncCasParser) -> None:
9393
async with async_client.cdsl.with_streaming_response.parse_pdf() as response:

0 commit comments

Comments
 (0)