Skip to content

Commit 526e6db

Browse files
committed
📝 Update markdown include syntax for the rest of the docs
1 parent a174b24 commit 526e6db

File tree

6 files changed

+46
-1868
lines changed

6 files changed

+46
-1868
lines changed

docs/tutorial/fastapi/tests.md

Lines changed: 4 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,7 @@ We will use the application with the hero models, but without team models, and w
1414

1515
Now we will see how useful it is to have this session dependency. ✨
1616

17-
/// details | 👀 Full file preview
18-
19-
```Python
20-
{!./docs_src/tutorial/fastapi/app_testing/tutorial001/main.py!}
21-
```
22-
23-
///
17+
{* ./docs_src/tutorial/fastapi/app_testing/tutorial001/main.py ln[0] *}
2418

2519
## File Structure
2620

@@ -304,21 +298,7 @@ But normally we will create **lots of other test functions**. And now all the bo
304298

305299
Let's add some more tests:
306300

307-
```Python hl_lines="3 22"
308-
# Code above omitted 👆
309-
310-
{!./docs_src/tutorial/fastapi/app_testing/tutorial001/test_main.py[ln:30-58]!}
311-
312-
# Code below omitted 👇
313-
```
314-
315-
/// details | 👀 Full file preview
316-
317-
```Python
318-
{!./docs_src/tutorial/fastapi/app_testing/tutorial001/test_main.py!}
319-
```
320-
321-
///
301+
{* ./docs_src/tutorial/fastapi/app_testing/tutorial001/test_main.py ln[30:58] hl[30,49] *}
322302

323303
/// tip
324304

@@ -338,23 +318,7 @@ For these examples, **that would have been simpler**, there's no need to separat
338318

339319
But for the next test function, we will require **both fixtures**, the **client** and the **session**.
340320

341-
```Python hl_lines="6 10"
342-
{!./docs_src/tutorial/fastapi/app_testing/tutorial001/test_main.py[ln:1-6]!}
343-
344-
# Code here omitted 👈
345-
346-
{!./docs_src/tutorial/fastapi/app_testing/tutorial001/test_main.py[ln:61-81]!}
347-
348-
# Code below omitted 👇
349-
```
350-
351-
/// details | 👀 Full file preview
352-
353-
```Python
354-
{!./docs_src/tutorial/fastapi/app_testing/tutorial001/test_main.py!}
355-
```
356-
357-
///
321+
{* ./docs_src/tutorial/fastapi/app_testing/tutorial001/test_main.py ln[1:6,61:81] hl[6,61] *}
358322

359323
In this test function, we want to check that the *path operation* to **read a list of heroes** actually sends us heroes.
360324

@@ -380,19 +344,7 @@ The function for the **client fixture** and the actual testing function will **b
380344

381345
Using the same ideas, requiring the fixtures, creating data that we need for the tests, etc., we can now add the rest of the tests. They look quite similar to what we have done up to now.
382346

383-
```Python hl_lines="3 18 33"
384-
# Code above omitted 👆
385-
386-
{!./docs_src/tutorial/fastapi/app_testing/tutorial001/test_main.py[ln:84-125]!}
387-
```
388-
389-
/// details | 👀 Full file preview
390-
391-
```Python
392-
{!./docs_src/tutorial/fastapi/app_testing/tutorial001/test_main.py!}
393-
```
394-
395-
///
347+
{* ./docs_src/tutorial/fastapi/app_testing/tutorial001/test_main.py ln[84:125] hl[84,99,114] *}
396348

397349
## Run the Tests
398350

0 commit comments

Comments
 (0)