@@ -73,6 +73,7 @@ def log_exception():
7373
7474@pytest .mark .parametrize ("level" , ["debug" , "info" , "error" ])
7575def test_record_format_per_log_level (client_and_log_handler , level ):
76+ """Test if log messages are formatted correctly for all log levels"""
7677 api_client , handler = client_and_log_handler
7778
7879 response = api_client .get ("/log/levels/" + level )
@@ -92,6 +93,7 @@ def test_record_format_per_log_level(client_and_log_handler, level):
9293
9394
9495def test_correlation_id_given (client_and_log_handler ):
96+ """Test if a given correlation ID is added to the logs"""
9597 api_client , handler = client_and_log_handler
9698
9799 response = api_client .get ("/log/levels/debug" , headers = {"X-Correlation-Id" : "abc-def" })
@@ -104,6 +106,7 @@ def test_correlation_id_given(client_and_log_handler):
104106
105107
106108def test_correlation_id_generated (client_and_log_handler ):
109+ """Test if a missing correlation ID is replaced by an autogenerated UUID"""
107110 api_client , handler = client_and_log_handler
108111
109112 response = api_client .get ("/log/levels/debug" )
@@ -119,6 +122,7 @@ def test_correlation_id_generated(client_and_log_handler):
119122
120123
121124def test_extra_property (client_and_log_handler ):
125+ """Test adding an extra property to a log message"""
122126 api_client , handler = client_and_log_handler
123127
124128 response = api_client .get ("/log/extra_property" )
@@ -131,6 +135,7 @@ def test_extra_property(client_and_log_handler):
131135
132136
133137def test_exception_logged_with_stack_trace (client_and_log_handler ):
138+ """Test if the details of a stack trace are logged"""
134139 api_client , handler = client_and_log_handler
135140
136141 response = api_client .get ("/log/exception" )
0 commit comments