Skip to content

Commit

Permalink
Satisfy something else...
Browse files Browse the repository at this point in the history
  • Loading branch information
olitheolix committed Jun 20, 2018
1 parent 96477d0 commit d956bc4
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions kubernetes_asyncio/watch/watch_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,17 @@ async def test_watch_with_decode(self):
fake_resp = CoroutineMock()
fake_resp.content.readline = CoroutineMock()
side_effects = [
{"type": "ADDED", "object": {"metadata": {"name": "test0"}, "spec": {}, "status": {}}},
{"type": "ADDED", "object": {"metadata": {"name": "test1"}, "spec": {}, "status": {}}},
{"type": "ADDED", "object": {"metadata": {"name": "test2"}, "spec": {}, "status": {}}},
{
"type": "ADDED",
"object": {
"metadata": {"name": "test{}".format(uid)},
"spec": {}, "status": {}
}
}
for uid in range(3)
]
side_effects = [json.dumps(_).encode('utf8') for _ in side_effects]
side_effects = side_effects + [AssertionError('Should not have been called')]
side_effects.extend([AssertionError('Should not have been called')])
fake_resp.content.readline.side_effect = side_effects

fake_api = Mock()
Expand Down

0 comments on commit d956bc4

Please sign in to comment.