Add typing for all the TestCase functions.
Review Request #13413 — Created Nov. 14, 2023 and submitted — Latest diff uploaded
This updates all the object creation functions and utility context
managers inTestCaseto provide type hints. This helps to write better
type-safe unit tests, and resolves a lot of problems that currently
exist when passing in values that default toNoneor accept multiple
value types.In the process, documentation has been updated to meet current standards.
There are a couple of fixes in here. For instance,
create_visit()
ignored thetimestampfield and didn't normalizeusercorrectly, and
http_request()passed in bad empty arguments when constructing a
ResolverMatch. These have been addressed.
All unit tests pass.