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

Commit

Permalink
add a test for string resource_version
Browse files Browse the repository at this point in the history
a convinience for e.g. custom resources which deserializes the value as
a string
  • Loading branch information
juliantaylor committed Dec 12, 2018
1 parent 5eb6633 commit c40c9cc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions watch/watch_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,15 @@ def test_watch_resource_version_set(self):
if count == len(values) * 3:
w.stop()

count = 1
fake_api.get_namespaces.reset_mock()
# test it also works with a string resource version which you get from
# deserializing custom objects
for e in w.stream(fake_api.get_namespaces, resource_version="5"):
count += 1
if count == len(values) * 3:
w.stop()

def test_watch_stream_twice(self):
w = Watch(float)
for step in ['first', 'second']:
Expand Down

0 comments on commit c40c9cc

Please sign in to comment.