Skip to content

Commit c3f8923

Browse files
committed
Docstrings
1 parent 13dac11 commit c3f8923

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/test_flask.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ def log_exception():
7373

7474
@pytest.mark.parametrize("level", ["debug", "info", "error"])
7575
def 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

9495
def 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

106108
def 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

121124
def 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

133137
def 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

Comments
 (0)