HttpContextAccessor returns null for HttpContext in tests
I want to add some EF Core query filters inside my DbContext's OnModelCreating that ultimately leverage values from the user's ClaimsPrincipal, so I need to access the HttpContext for the request to grab it from that. Injecting IHttpContextAccessor into DbContext (long term I'd probably inject a TenantService instead) works when the app is run normally, but when running integration tests with WebApplicationFactory HttpContext always seems to be null.
If I run this app normally it'll work as expected and the /api/todos endpoint will always return an empty list, but my test suite that endpoint will return a todo