Enhance testing strategy by implementing TDD for video URL downloads and critical functions

This commit is contained in:
Mikhail Yevchenko
2026-04-01 14:13:26 +00:00
parent 01a376ae21
commit 34e49c0d9f
+1 -1
View File
@@ -34,7 +34,7 @@ As an HTML templating engine, you can use Jinja2, which is built into Flask, for
8. Errors and logs — only practical minimum: understandable HTTP errors and basic structured logging.
9. Configuration only through environment variables: port, cache TTL, log level and timeouts.
10. HTTPS not in application: TLS terminates at external reverse proxy (Nginx/Caddy/Traefik), Flask runs behind it.
11. Tests only on critical path: URL parsing, cache, playlist and segment proxying, error handling.
11. TDD: Write a single integration test that will consist of downloading few video urls. It should query these videos over proxy and check if it works properly (yt-dlp is fully capable substitute for a browser that can be configured to output all necessary debug inforation, such as headers and cookies). Also write tests for critical functions like URL parsing, caching, playlist and segment proxying, and error handling. All test should be in `tests/` folder and use `pytest` as a testing framework. All tests should generate maximum debugging output to make it easy to understand what went wrong in case of failure.
12. Documentation and license: only `README.md`, `AGENTS.md` and MIT license.
### Project Structure