Skip to content
This repository was archived by the owner on Apr 15, 2024. It is now read-only.

Commit caa6383

Browse files
committed
Added kv.get.keys test
1 parent 81bc8dc commit caa6383

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

tests/test_std.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,16 @@ def test_kv_acquire_release(self, consul_port):
127127
c.session.destroy(s1)
128128
c.session.destroy(s2)
129129

130+
def test_kv_keys_only(self, consul_port):
131+
c = consul.Consul(port=consul_port)
132+
133+
assert c.kv.put('bar', '4') is True
134+
assert c.kv.put('base/foo', '1') is True
135+
assert c.kv.put('base/base/foo', '5') is True
136+
137+
index, data = c.kv.get('base/', keys=True, separator='/')
138+
assert data == ['base/base/', 'base/foo']
139+
130140
def test_agent_checks(self, consul_port):
131141
c = consul.Consul(port=consul_port)
132142

0 commit comments

Comments
 (0)