Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixed unit tests
  • Loading branch information
daniel-sanche committed Apr 20, 2021
commit 54ff4bc7b525bfcefded19b2371a252936c78f31
16 changes: 7 additions & 9 deletions tests/unit/handlers/test_structured_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def test_format(self):
"userAgent": "",
"protocol": "",
},
"logging.googleapis.com/labels": str(labels),
"logging.googleapis.com/labels": labels,
}
handler.filter(record)
result = json.loads(handler.format(record))
Expand Down Expand Up @@ -108,7 +108,7 @@ def test_format_minimal(self):
"userAgent": "",
"protocol": "",
},
"logging.googleapis.com/labels": "{}",
"logging.googleapis.com/labels": {},
}
handler.filter(record)
result = json.loads(handler.format(record))
Expand Down Expand Up @@ -194,13 +194,11 @@ def test_format_overrides(self):
"userAgent": "",
"protocol": "",
},
"logging.googleapis.com/labels": str(
{
"default_key": "default-value",
"overwritten_key": "new_value",
"added_key": "added_value",
}
),
"logging.googleapis.com/labels": {
"default_key": "default-value",
"overwritten_key": "new_value",
"added_key": "added_value",
},
}

app = self.create_app()
Expand Down