Skip to content

Commit

Permalink
NXDRIVE-2860: Code Coverage - added test cases to test_remote_client …
Browse files Browse the repository at this point in the history
…13/12 -- 4
  • Loading branch information
gitofanindya committed Dec 13, 2023
1 parent cf5be71 commit 6a43599
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/functional/test_remote_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,17 +274,17 @@ def get_upload_(*args, **kwargs):
return mocked_upload_obj_

obj1_ = Mock()
returned_val = None
with manager:
with patch.object(Action, "get_current_action", new=get_current_action_):
with patch.object(remote.dao, "get_download", new=get_download_):
with patch.object(
remote.dao, "set_transfer_progress", new=set_transfer_progress_
):
returned_val = remote.transfer_end_callback(obj1_)
with pytest.raises(Exception) as err:
remote.transfer_end_callback(obj1_)
assert err
with patch.object(Action, "get_current_action", new=get_current_action__):
with patch.object(remote.dao, "get_download", new=get_upload_):
returned_val = remote.transfer_end_callback(obj1_)
assert not returned_val
with patch.object(remote.dao, "get_upload", new=get_upload_):
with pytest.raises(Exception) as err:
remote.transfer_end_callback(obj1_)
assert err

0 comments on commit 6a43599

Please sign in to comment.