diff options
Diffstat (limited to 'tests/test_commands.py')
-rw-r--r-- | tests/test_commands.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_commands.py b/tests/test_commands.py index 7f1e33e..fc85b5f 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -2600,6 +2600,17 @@ class TestRedisCommands(object): assert resp == [0, None, 255] @skip_if_server_version_lt('4.0.0') + def test_memory_stats(self, r): + # put a key into the current db to make sure that "db.<current-db>" + # has data + r.set('foo', 'bar') + stats = r.memory_stats() + assert isinstance(stats, dict) + for key, value in iteritems(stats): + if key.startswith('db.'): + assert isinstance(value, dict) + + @skip_if_server_version_lt('4.0.0') def test_memory_usage(self, r): r.set('foo', 'bar') assert isinstance(r.memory_usage('foo'), int) |