Skip to content

Commit 0fae517

Browse files
committed
[IMP] fastapi_log: In tests, check Log identifier in response
1 parent 341195a commit 0fae517

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fastapi_log/tests/test_fastapi_log.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ def test_log_exception(self):
4747

4848
self.assertEqual(len(capturer.records), 1)
4949
log = capturer.records[0]
50+
self.assertEqual(response.headers["API-Log-Entry-ID"], str(log.id))
51+
5052
self.assertIn("/fastapi_demo/test/demo/exception", log.request_url)
5153
self.assertEqual(log.request_method, "GET")
5254
self.assertEqual(log.response_status_code, 400)

0 commit comments

Comments
 (0)