Skip to content

Commit 8c7ae7b

Browse files
chore: update mock server docs
1 parent 10a1f64 commit 8c7ae7b

8 files changed

Lines changed: 150 additions & 157 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/fix/test_standard.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
class TestStandard:
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: Benchify) -> None:
2323
standard = client.fix.standard.create(
@@ -35,7 +35,7 @@ def test_method_create(self, client: Benchify) -> None:
3535
)
3636
assert_matches_type(StandardCreateResponse, standard, path=["response"])
3737

38-
@pytest.mark.skip(reason="Prism tests are disabled")
38+
@pytest.mark.skip(reason="Mock server tests are disabled")
3939
@parametrize
4040
def test_method_create_with_all_params(self, client: Benchify) -> None:
4141
standard = client.fix.standard.create(
@@ -78,7 +78,7 @@ def test_method_create_with_all_params(self, client: Benchify) -> None:
7878
)
7979
assert_matches_type(StandardCreateResponse, standard, path=["response"])
8080

81-
@pytest.mark.skip(reason="Prism tests are disabled")
81+
@pytest.mark.skip(reason="Mock server tests are disabled")
8282
@parametrize
8383
def test_raw_response_create(self, client: Benchify) -> None:
8484
response = client.fix.standard.with_raw_response.create(
@@ -100,7 +100,7 @@ def test_raw_response_create(self, client: Benchify) -> None:
100100
standard = response.parse()
101101
assert_matches_type(StandardCreateResponse, standard, path=["response"])
102102

103-
@pytest.mark.skip(reason="Prism tests are disabled")
103+
@pytest.mark.skip(reason="Mock server tests are disabled")
104104
@parametrize
105105
def test_streaming_response_create(self, client: Benchify) -> None:
106106
with client.fix.standard.with_streaming_response.create(
@@ -130,7 +130,7 @@ class TestAsyncStandard:
130130
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
131131
)
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_create(self, async_client: AsyncBenchify) -> None:
136136
standard = await async_client.fix.standard.create(
@@ -148,7 +148,7 @@ async def test_method_create(self, async_client: AsyncBenchify) -> None:
148148
)
149149
assert_matches_type(StandardCreateResponse, standard, path=["response"])
150150

151-
@pytest.mark.skip(reason="Prism tests are disabled")
151+
@pytest.mark.skip(reason="Mock server tests are disabled")
152152
@parametrize
153153
async def test_method_create_with_all_params(self, async_client: AsyncBenchify) -> None:
154154
standard = await async_client.fix.standard.create(
@@ -191,7 +191,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncBenchify)
191191
)
192192
assert_matches_type(StandardCreateResponse, standard, 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_raw_response_create(self, async_client: AsyncBenchify) -> None:
197197
response = await async_client.fix.standard.with_raw_response.create(
@@ -213,7 +213,7 @@ async def test_raw_response_create(self, async_client: AsyncBenchify) -> None:
213213
standard = await response.parse()
214214
assert_matches_type(StandardCreateResponse, standard, path=["response"])
215215

216-
@pytest.mark.skip(reason="Prism tests are disabled")
216+
@pytest.mark.skip(reason="Mock server tests are disabled")
217217
@parametrize
218218
async def test_streaming_response_create(self, async_client: AsyncBenchify) -> None:
219219
async with async_client.fix.standard.with_streaming_response.create(

tests/api_resources/test_fix.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
class TestFix:
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_ai_fallback(self, client: Benchify) -> None:
2323
fix = client.fix.create_ai_fallback(
@@ -31,7 +31,7 @@ def test_method_create_ai_fallback(self, client: Benchify) -> None:
3131
)
3232
assert_matches_type(FixCreateAIFallbackResponse, fix, 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_method_create_ai_fallback_with_all_params(self, client: Benchify) -> None:
3737
fix = client.fix.create_ai_fallback(
@@ -69,7 +69,7 @@ def test_method_create_ai_fallback_with_all_params(self, client: Benchify) -> No
6969
)
7070
assert_matches_type(FixCreateAIFallbackResponse, fix, 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_raw_response_create_ai_fallback(self, client: Benchify) -> None:
7575
response = client.fix.with_raw_response.create_ai_fallback(
@@ -87,7 +87,7 @@ def test_raw_response_create_ai_fallback(self, client: Benchify) -> None:
8787
fix = response.parse()
8888
assert_matches_type(FixCreateAIFallbackResponse, fix, 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
def test_streaming_response_create_ai_fallback(self, client: Benchify) -> None:
9393
with client.fix.with_streaming_response.create_ai_fallback(
@@ -113,7 +113,7 @@ class TestAsyncFix:
113113
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
114114
)
115115

116-
@pytest.mark.skip(reason="Prism tests are disabled")
116+
@pytest.mark.skip(reason="Mock server tests are disabled")
117117
@parametrize
118118
async def test_method_create_ai_fallback(self, async_client: AsyncBenchify) -> None:
119119
fix = await async_client.fix.create_ai_fallback(
@@ -127,7 +127,7 @@ async def test_method_create_ai_fallback(self, async_client: AsyncBenchify) -> N
127127
)
128128
assert_matches_type(FixCreateAIFallbackResponse, fix, path=["response"])
129129

130-
@pytest.mark.skip(reason="Prism tests are disabled")
130+
@pytest.mark.skip(reason="Mock server tests are disabled")
131131
@parametrize
132132
async def test_method_create_ai_fallback_with_all_params(self, async_client: AsyncBenchify) -> None:
133133
fix = await async_client.fix.create_ai_fallback(
@@ -165,7 +165,7 @@ async def test_method_create_ai_fallback_with_all_params(self, async_client: Asy
165165
)
166166
assert_matches_type(FixCreateAIFallbackResponse, fix, path=["response"])
167167

168-
@pytest.mark.skip(reason="Prism tests are disabled")
168+
@pytest.mark.skip(reason="Mock server tests are disabled")
169169
@parametrize
170170
async def test_raw_response_create_ai_fallback(self, async_client: AsyncBenchify) -> None:
171171
response = await async_client.fix.with_raw_response.create_ai_fallback(
@@ -183,7 +183,7 @@ async def test_raw_response_create_ai_fallback(self, async_client: AsyncBenchify
183183
fix = await response.parse()
184184
assert_matches_type(FixCreateAIFallbackResponse, fix, path=["response"])
185185

186-
@pytest.mark.skip(reason="Prism tests are disabled")
186+
@pytest.mark.skip(reason="Mock server tests are disabled")
187187
@parametrize
188188
async def test_streaming_response_create_ai_fallback(self, async_client: AsyncBenchify) -> None:
189189
async with async_client.fix.with_streaming_response.create_ai_fallback(

tests/api_resources/test_fix_parsing_and_diagnose.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
class TestFixParsingAndDiagnose:
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_detect_issues(self, client: Benchify) -> None:
2323
fix_parsing_and_diagnose = client.fix_parsing_and_diagnose.detect_issues()
2424
assert_matches_type(FixParsingAndDiagnoseDetectIssuesResponse, fix_parsing_and_diagnose, 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_detect_issues_with_all_params(self, client: Benchify) -> None:
2929
fix_parsing_and_diagnose = client.fix_parsing_and_diagnose.detect_issues(
@@ -43,7 +43,7 @@ def test_method_detect_issues_with_all_params(self, client: Benchify) -> None:
4343
)
4444
assert_matches_type(FixParsingAndDiagnoseDetectIssuesResponse, fix_parsing_and_diagnose, 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_raw_response_detect_issues(self, client: Benchify) -> None:
4949
response = client.fix_parsing_and_diagnose.with_raw_response.detect_issues()
@@ -53,7 +53,7 @@ def test_raw_response_detect_issues(self, client: Benchify) -> None:
5353
fix_parsing_and_diagnose = response.parse()
5454
assert_matches_type(FixParsingAndDiagnoseDetectIssuesResponse, fix_parsing_and_diagnose, path=["response"])
5555

56-
@pytest.mark.skip(reason="Prism tests are disabled")
56+
@pytest.mark.skip(reason="Mock server tests are disabled")
5757
@parametrize
5858
def test_streaming_response_detect_issues(self, client: Benchify) -> None:
5959
with client.fix_parsing_and_diagnose.with_streaming_response.detect_issues() as response:
@@ -71,13 +71,13 @@ class TestAsyncFixParsingAndDiagnose:
7171
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
7272
)
7373

74-
@pytest.mark.skip(reason="Prism tests are disabled")
74+
@pytest.mark.skip(reason="Mock server tests are disabled")
7575
@parametrize
7676
async def test_method_detect_issues(self, async_client: AsyncBenchify) -> None:
7777
fix_parsing_and_diagnose = await async_client.fix_parsing_and_diagnose.detect_issues()
7878
assert_matches_type(FixParsingAndDiagnoseDetectIssuesResponse, fix_parsing_and_diagnose, 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_method_detect_issues_with_all_params(self, async_client: AsyncBenchify) -> None:
8383
fix_parsing_and_diagnose = await async_client.fix_parsing_and_diagnose.detect_issues(
@@ -97,7 +97,7 @@ async def test_method_detect_issues_with_all_params(self, async_client: AsyncBen
9797
)
9898
assert_matches_type(FixParsingAndDiagnoseDetectIssuesResponse, fix_parsing_and_diagnose, 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
async def test_raw_response_detect_issues(self, async_client: AsyncBenchify) -> None:
103103
response = await async_client.fix_parsing_and_diagnose.with_raw_response.detect_issues()
@@ -107,7 +107,7 @@ async def test_raw_response_detect_issues(self, async_client: AsyncBenchify) ->
107107
fix_parsing_and_diagnose = await response.parse()
108108
assert_matches_type(FixParsingAndDiagnoseDetectIssuesResponse, fix_parsing_and_diagnose, 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
async def test_streaming_response_detect_issues(self, async_client: AsyncBenchify) -> None:
113113
async with async_client.fix_parsing_and_diagnose.with_streaming_response.detect_issues() as response:

tests/api_resources/test_fix_string_literals.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
class TestFixStringLiterals:
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: Benchify) -> None:
2323
fix_string_literal = client.fix_string_literals.create(
@@ -28,7 +28,7 @@ def test_method_create(self, client: Benchify) -> None:
2828
)
2929
assert_matches_type(FixStringLiteralCreateResponse, fix_string_literal, 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_create_with_all_params(self, client: Benchify) -> None:
3434
fix_string_literal = client.fix_string_literals.create(
@@ -41,7 +41,7 @@ def test_method_create_with_all_params(self, client: Benchify) -> None:
4141
)
4242
assert_matches_type(FixStringLiteralCreateResponse, fix_string_literal, 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_raw_response_create(self, client: Benchify) -> None:
4747
response = client.fix_string_literals.with_raw_response.create(
@@ -56,7 +56,7 @@ def test_raw_response_create(self, client: Benchify) -> None:
5656
fix_string_literal = response.parse()
5757
assert_matches_type(FixStringLiteralCreateResponse, fix_string_literal, path=["response"])
5858

59-
@pytest.mark.skip(reason="Prism tests are disabled")
59+
@pytest.mark.skip(reason="Mock server tests are disabled")
6060
@parametrize
6161
def test_streaming_response_create(self, client: Benchify) -> None:
6262
with client.fix_string_literals.with_streaming_response.create(
@@ -79,7 +79,7 @@ class TestAsyncFixStringLiterals:
7979
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
8080
)
8181

82-
@pytest.mark.skip(reason="Prism tests are disabled")
82+
@pytest.mark.skip(reason="Mock server tests are disabled")
8383
@parametrize
8484
async def test_method_create(self, async_client: AsyncBenchify) -> None:
8585
fix_string_literal = await async_client.fix_string_literals.create(
@@ -90,7 +90,7 @@ async def test_method_create(self, async_client: AsyncBenchify) -> None:
9090
)
9191
assert_matches_type(FixStringLiteralCreateResponse, fix_string_literal, path=["response"])
9292

93-
@pytest.mark.skip(reason="Prism tests are disabled")
93+
@pytest.mark.skip(reason="Mock server tests are disabled")
9494
@parametrize
9595
async def test_method_create_with_all_params(self, async_client: AsyncBenchify) -> None:
9696
fix_string_literal = await async_client.fix_string_literals.create(
@@ -103,7 +103,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncBenchify)
103103
)
104104
assert_matches_type(FixStringLiteralCreateResponse, fix_string_literal, path=["response"])
105105

106-
@pytest.mark.skip(reason="Prism tests are disabled")
106+
@pytest.mark.skip(reason="Mock server tests are disabled")
107107
@parametrize
108108
async def test_raw_response_create(self, async_client: AsyncBenchify) -> None:
109109
response = await async_client.fix_string_literals.with_raw_response.create(
@@ -118,7 +118,7 @@ async def test_raw_response_create(self, async_client: AsyncBenchify) -> None:
118118
fix_string_literal = await response.parse()
119119
assert_matches_type(FixStringLiteralCreateResponse, fix_string_literal, path=["response"])
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_streaming_response_create(self, async_client: AsyncBenchify) -> None:
124124
async with async_client.fix_string_literals.with_streaming_response.create(

tests/api_resources/test_fixer.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
class TestFixer:
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_run(self, client: Benchify) -> None:
2323
fixer = client.fixer.run()
2424
assert_matches_type(FixerRunResponse, fixer, 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_run_with_all_params(self, client: Benchify) -> None:
2929
fixer = client.fixer.run(
@@ -49,7 +49,7 @@ def test_method_run_with_all_params(self, client: Benchify) -> None:
4949
)
5050
assert_matches_type(FixerRunResponse, fixer, path=["response"])
5151

52-
@pytest.mark.skip(reason="Prism tests are disabled")
52+
@pytest.mark.skip(reason="Mock server tests are disabled")
5353
@parametrize
5454
def test_raw_response_run(self, client: Benchify) -> None:
5555
response = client.fixer.with_raw_response.run()
@@ -59,7 +59,7 @@ def test_raw_response_run(self, client: Benchify) -> None:
5959
fixer = response.parse()
6060
assert_matches_type(FixerRunResponse, fixer, path=["response"])
6161

62-
@pytest.mark.skip(reason="Prism tests are disabled")
62+
@pytest.mark.skip(reason="Mock server tests are disabled")
6363
@parametrize
6464
def test_streaming_response_run(self, client: Benchify) -> None:
6565
with client.fixer.with_streaming_response.run() as response:
@@ -77,13 +77,13 @@ class TestAsyncFixer:
7777
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
7878
)
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_method_run(self, async_client: AsyncBenchify) -> None:
8383
fixer = await async_client.fixer.run()
8484
assert_matches_type(FixerRunResponse, fixer, 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_method_run_with_all_params(self, async_client: AsyncBenchify) -> None:
8989
fixer = await async_client.fixer.run(
@@ -109,7 +109,7 @@ async def test_method_run_with_all_params(self, async_client: AsyncBenchify) ->
109109
)
110110
assert_matches_type(FixerRunResponse, fixer, 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_raw_response_run(self, async_client: AsyncBenchify) -> None:
115115
response = await async_client.fixer.with_raw_response.run()
@@ -119,7 +119,7 @@ async def test_raw_response_run(self, async_client: AsyncBenchify) -> None:
119119
fixer = await response.parse()
120120
assert_matches_type(FixerRunResponse, fixer, path=["response"])
121121

122-
@pytest.mark.skip(reason="Prism tests are disabled")
122+
@pytest.mark.skip(reason="Mock server tests are disabled")
123123
@parametrize
124124
async def test_streaming_response_run(self, async_client: AsyncBenchify) -> None:
125125
async with async_client.fixer.with_streaming_response.run() as response:

0 commit comments

Comments
 (0)