(self)
| 72 | |
| 73 | class TestPeriodicLog: |
| 74 | def test_extension_enabled(self): |
| 75 | # Expected that settings for this extension loaded successfully |
| 76 | # And on certain conditions - extension raising NotConfigured |
| 77 | |
| 78 | # "PERIODIC_LOG_STATS": True -> set to {"enabled": True} |
| 79 | # due to TypeError exception from settings.getdict |
| 80 | assert extension({"PERIODIC_LOG_STATS": True, "LOGSTATS_INTERVAL": 60}) |
| 81 | |
| 82 | # "PERIODIC_LOG_STATS": "True" -> set to {"enabled": True} |
| 83 | # due to JSONDecodeError(ValueError) exception from settings.getdict |
| 84 | assert extension({"PERIODIC_LOG_STATS": "True", "LOGSTATS_INTERVAL": 60}) |
| 85 | |
| 86 | # The ame for PERIODIC_LOG_DELTA: |
| 87 | assert extension({"PERIODIC_LOG_DELTA": True, "LOGSTATS_INTERVAL": 60}) |
| 88 | assert extension({"PERIODIC_LOG_DELTA": "True", "LOGSTATS_INTERVAL": 60}) |
| 89 | |
| 90 | @coroutine_test |
| 91 | async def test_log_delta(self): |
nothing calls this directly
no test coverage detected