refactor log and context tests to use httptest