(test_redis_settings: RedisSettings, create_pool)
| 67 | |
| 68 | |
| 69 | async def test_redis_log(test_redis_settings: RedisSettings, create_pool): |
| 70 | redis = await create_pool(test_redis_settings) |
| 71 | await redis.flushall() |
| 72 | await redis.set(b'a', b'1') |
| 73 | await redis.set(b'b', b'2') |
| 74 | |
| 75 | log_msgs = [] |
| 76 | |
| 77 | def _log(s): |
| 78 | log_msgs.append(s) |
| 79 | |
| 80 | await log_redis_info(redis, _log) |
| 81 | assert len(log_msgs) == 1 |
| 82 | assert re.search(r'redis_version=\d\.', log_msgs[0]), log_msgs |
| 83 | assert log_msgs[0].endswith(' db_keys=2') |
| 84 | |
| 85 | |
| 86 | def test_truncate(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…