test: branch test improvements
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
Fixes: #2128 (closed).
This MR includes the following improvements:
- Removed ineffective len() assertions from branch tests and updated the fixture file with additional branch for better clarity.
- Improved the mustWriteHTTPResponse() function by properly deferring file closing to release resources.
- Fixed outdated mock example in README, created real test example with mock.
Edited by Tim Kuzmin