@@ -66,9 +66,8 @@ def tearDown(self):
6666 def test_pssh_client_exec_command (self ):
6767 cmd = self .client .exec_command (self .fake_cmd )[0 ]
6868 output = self .client .get_stdout (cmd )
69- expected = {self .host : {'exit_code' : 0 }}
70- self .assertEqual (expected , output ,
71- msg = "Got unexpected command output - %s" % (output ,))
69+ self .assertTrue (self .host in output ,
70+ msg = "No output for host" )
7271 self .assertTrue (output [self .host ]['exit_code' ] == 0 )
7372
7473 def test_pssh_client_no_stdout_non_zero_exit_code (self ):
@@ -271,9 +270,11 @@ def test_pssh_client_exec_command_password(self):
271270 password = '' )
272271 cmd = client .exec_command (self .fake_cmd )[0 ]
273272 output = client .get_stdout (cmd )
274- expected = {self .host : {'exit_code' : 0 }}
275- self .assertEqual (expected , output ,
276- msg = "Got unexpected command output - %s" % (output ,))
273+ self .assertTrue (self .host in output ,
274+ msg = "No output for host" )
275+ self .assertTrue (output [self .host ]['exit_code' ] == 0 ,
276+ msg = "Expected exit code 0, got %s" % (
277+ output [self .host ]['exit_code' ],))
277278 del client
278279
279280 def test_pssh_client_long_running_command (self ):
0 commit comments