@@ -66,9 +66,8 @@ def tearDown(self):
66
66
def test_pssh_client_exec_command (self ):
67
67
cmd = self .client .exec_command (self .fake_cmd )[0 ]
68
68
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" )
72
71
self .assertTrue (output [self .host ]['exit_code' ] == 0 )
73
72
74
73
def test_pssh_client_no_stdout_non_zero_exit_code (self ):
@@ -271,9 +270,11 @@ def test_pssh_client_exec_command_password(self):
271
270
password = '' )
272
271
cmd = client .exec_command (self .fake_cmd )[0 ]
273
272
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' ],))
277
278
del client
278
279
279
280
def test_pssh_client_long_running_command (self ):
0 commit comments