Commit d845a1b
authored
test: Enhance JSON scraping pipeline test
This commit enhances the test suite for the JSON scraping pipeline by introducing the following improvements:
- Separate configuration from the test code by loading it from a JSON file (config.json)
- Use a parametrized fixture to run the test with multiple configurations automatically
- Read the sample JSON file from a separate inputs directory for better organization
- Add explicit assertions to verify the expected output (list of titles)
- Improve test organization and separation of concerns using fixtures
- Promote better coding practices and make the test suite more extensible
These changes aim to improve the testability, maintainability, and flexibility of the test suite. They make it easier to manage configurations, add or modify test cases, and ensure the robustness of the scraping pipeline. The test suite now follows best practices and is better prepared for future changes and requirements.1 parent c17daca commit d845a1b
1 file changed
+24
-30
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
8 | 14 | | |
| 15 | + | |
9 | 16 | | |
10 | 17 | | |
11 | 18 | | |
12 | | - | |
| 19 | + | |
13 | 20 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| 21 | + | |
| 22 | + | |
19 | 23 | | |
20 | | - | |
21 | 24 | | |
22 | 25 | | |
23 | | - | |
24 | | - | |
25 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
26 | 29 | | |
27 | | - | |
| 30 | + | |
28 | 31 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 32 | + | |
43 | 33 | | |
44 | | - | |
| 34 | + | |
| 35 | + | |
45 | 36 | | |
46 | | - | |
| 37 | + | |
47 | 38 | | |
| 39 | + | |
| 40 | + | |
48 | 41 | | |
49 | 42 | | |
50 | 43 | | |
51 | 44 | | |
52 | 45 | | |
53 | | - | |
54 | 46 | | |
55 | 47 | | |
56 | 48 | | |
| 49 | + | |
| 50 | + | |
0 commit comments