Skip to content

Commit fe2b4a0

Browse files
committed
Fix slow_watch_mock in test_watch_timeout_on_establishment
slow_watch_mock returns nothing, but Watcher._run expects a Watch object returns an iterable. This causes "TypeError: 'NoneType' object is not iterable" mentioned in kragniz#1959 (comment) This commit modifies slow_watch_mock so that it returns an empty list to avoid the type error.
1 parent 49fa440 commit fe2b4a0

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

tests/test_etcd3.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,7 @@ def test_watch_timeout_on_establishment(self, etcd):
378378

379379
def slow_watch_mock(*args, **kwargs):
380380
time.sleep(4)
381+
return []
381382

382383
foo_etcd.watcher._watch_stub.Watch = slow_watch_mock # noqa
383384

0 commit comments

Comments
 (0)