Skip to content

Commit 2d49678

Browse files
committed
Fix Documentation for docs/tutorial/fastapi/tests.md
1 parent 893f8bd commit 2d49678

File tree

1 file changed

+6
-38
lines changed

1 file changed

+6
-38
lines changed

docs/tutorial/fastapi/tests.md

Lines changed: 6 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ Now we will see how useful it is to have this session dependency. ✨
1616

1717
/// details | 👀 Full file preview
1818

19-
```Python
20-
{!./docs_src/tutorial/fastapi/app_testing/tutorial001/main.py!}
21-
```
19+
{* ./docs_src//tutorial/fastapi/app_testing/tutorial001/main.py *}
2220

2321
///
2422

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

305303
Let's add some more tests:
306304

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-
///
305+
{* ./docs_src//tutorial/fastapi/app_testing/tutorial001/test_main.py ln[30:58] hl[2,23] *}
322306

323307
/// tip
324308

@@ -338,21 +322,11 @@ For these examples, **that would have been simpler**, there's no need to separat
338322

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

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-
```
325+
{* ./docs_src//tutorial/fastapi/app_testing/tutorial001/test_main.py ln[1:6] hl[6,10] *}
350326

351327
/// details | 👀 Full file preview
352328

353-
```Python
354-
{!./docs_src/tutorial/fastapi/app_testing/tutorial001/test_main.py!}
355-
```
329+
{* ./docs_src//tutorial/fastapi/app_testing/tutorial001/test_main.py *}
356330

357331
///
358332

@@ -380,17 +354,11 @@ The function for the **client fixture** and the actual testing function will **b
380354

381355
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.
382356

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-
```
357+
{* ./docs_src//tutorial/fastapi/app_testing/tutorial001/test_main.py ln[84:125] hl[3,18,33] *}
388358

389359
/// details | 👀 Full file preview
390360

391-
```Python
392-
{!./docs_src/tutorial/fastapi/app_testing/tutorial001/test_main.py!}
393-
```
361+
{* ./docs_src//tutorial/fastapi/app_testing/tutorial001/test_main.py *}
394362

395363
///
396364

0 commit comments

Comments
 (0)