We need to implement tests for the following scenario:
Description
Test the formatting of log messages based on log level
Code Reference
|
class StreamFormatter(logging.Formatter): |
Test Cases
Case: formatted is an instance of Formatter in the logging package
- Preconditions: None
- Test Steps:
- create an instance of StreamFormatter
- check if the object is an instance of logging.Formatter
- Expected Result: instance test returns
True
Test Cases
Case: change the formatting of log messages other than INFO level
- Preconditions: Log record of type INFO
- Test Steps:
- create an instance of StreamFormatter
- create formatted log string with format()
- check if custom formatting is applied to log record when not of level INFO
- Expected Result: returns string formatted according to the log level
- Postcondition: formatted string of log record
We need to implement tests for the following scenario:
Description
Test the formatting of log messages based on log level
Code Reference
aeolis-python/aeolis/model.py
Line 64 in 0596eef
Test Cases
Case: formatted is an instance of Formatter in the logging package
TrueTest Cases
Case: change the formatting of log messages other than INFO level