Skip to content

Commit

Permalink
fixes unittests of MPC controller
Browse files Browse the repository at this point in the history
  • Loading branch information
srcansiz committed Mar 28, 2023
1 parent a7ca773 commit 23992cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_mpc_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def test_mpc_controller_02_exec(self):

with patch.object(fedbiomed.common.mpc_controller, "subprocess") as mock_process:
mock_process.Popen.return_value.returncode = 0
mock_process.Popen.return_value.communicate.return_value = "Opps", False
mock_process.Popen.return_value.communicate.return_value = b"Opps", False
status = self.mpc_controller._exec(["shamir-server-key"])
self.assertTrue(status)

Expand All @@ -64,7 +64,7 @@ def test_mpc_controller_02_exec_shamir(self):
# Test invalid num parties type
with patch.object(fedbiomed.common.mpc_controller, "subprocess") as mock_process:
mock_process.Popen.return_value.returncode = 0
mock_process.Popen.return_value.communicate.return_value = "Opps", True
mock_process.Popen.return_value.communicate.return_value = b"Opps", True
result = self.mpc_controller.exec_shamir(party_number=0,
num_parties=3,
ip_addresses="dummy/path/to/files")
Expand Down

0 comments on commit 23992cf

Please sign in to comment.