madzak / python-json-logger

Json Formatter for the standard python logger
BSD 2-Clause "Simplified" License
1.7k stars 231 forks source link

testFormatKeys cannot fail #103

Closed matanshavit closed 1 year ago

matanshavit commented 3 years ago

testFormatKeys makes assertions about supported keys found in the JSON output, but not about ones that aren't found. All assertions are of the form self.assertTrue(True), which cannot fail if a regression bug is later introduced. https://github.com/madzak/python-json-logger/blob/v2.0.1/tests/tests.py#L87-L89 The test should make assertions that can fail to prevent future bugs.