Skip to content
This repository was archived by the owner on Mar 13, 2022. It is now read-only.

Commit c40c9cc

Browse files
committed
add a test for string resource_version
a convinience for e.g. custom resources which deserializes the value as a string
1 parent 5eb6633 commit c40c9cc

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

watch/watch_test.py

+9
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,15 @@ def test_watch_resource_version_set(self):
9898
if count == len(values) * 3:
9999
w.stop()
100100

101+
count = 1
102+
fake_api.get_namespaces.reset_mock()
103+
# test it also works with a string resource version which you get from
104+
# deserializing custom objects
105+
for e in w.stream(fake_api.get_namespaces, resource_version="5"):
106+
count += 1
107+
if count == len(values) * 3:
108+
w.stop()
109+
101110
def test_watch_stream_twice(self):
102111
w = Watch(float)
103112
for step in ['first', 'second']:

0 commit comments

Comments
 (0)