-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed logging filter bug introduced in 1.4.4
- Loading branch information
Showing
2 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import logging | ||
|
||
from bazarr.app.logger import UnwantedWaitressMessageFilter | ||
|
||
def test_true_for_bazarr(): | ||
record = logging.makeLogRecord({ | ||
"level": logging.INFO, | ||
"msg": "a message from BAZARR for logging" | ||
}) | ||
assert UnwantedWaitressMessageFilter().filter(record) | ||
|
||
def test_false_below_error(): | ||
record = logging.makeLogRecord({ | ||
"level": logging.INFO | ||
}) | ||
assert not UnwantedWaitressMessageFilter().filter(record) | ||
|
||
def test_true_error_up(): | ||
record = logging.makeLogRecord({ | ||
"level": logging.CRITICAL | ||
}) | ||
assert UnwantedWaitressMessageFilter().filter(record) |