Skip to content

Commit

Permalink
De-cleverfied logic for easier reading
Browse files Browse the repository at this point in the history
  • Loading branch information
pahrohfit committed Oct 29, 2023
1 parent 9a8ab6a commit a0ab819
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/test_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -844,15 +844,14 @@ def __init__(self):

logger = structlog.stdlib.get_logger()

# These are different when running under async
exclude_keys = ["thread", "thread_name"]

callsite_params = self.get_callsite_parameters()
await logger.info("baz")
logger_params = json.loads(string_io.getvalue())

[callsite_params.pop(key) for key in exclude_keys]
[logger_params.pop(key) for key in exclude_keys]
# These are different when running under async
for key in ["thread", "thread_name"]:
callsite_params.pop(key)
logger_params.pop(key)

assert {"event": "baz", **callsite_params} == logger_params

Expand Down

0 comments on commit a0ab819

Please # to comment.