Skip to content

Commit

Permalink
[test] Fix missing assert on daemon lock show has correct output
Browse files Browse the repository at this point in the history
  • Loading branch information
cgalibern committed Jul 8, 2020
1 parent 5919d91 commit 28b4d75
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions opensvc/tests/commands/daemon/test_daemon.py
Expand Up @@ -86,19 +86,19 @@ def test_has_correct_default_format_forest(daemon_get, capture_stdout, tmp_file)
if int(sys.version[0]) > 2:
expected_output = '''
name id requester requested
|- plic 01e4491d-083f-48ba-8cdf-c5c8771e6b92 u2004-1 1593425914.0323133
`- ploc 01e4491d-083f-48ba-8cdf-c5c8771e6b99 u2004-1 1593425914.0423133
|- plic 01e4491d-083f-48ba-8cdf-c5c8771e6b99 u2004-1 1593425914.0423133
`- ploc 01e4491d-083f-48ba-8cdf-c5c8771e6b92 u2004-1 1593425914.0323133
'''
else:
expected_output = '''
name id requester requested
|- plic 01e4491d-083f-48ba-8cdf-c5c8771e6b92 u2004-1 1593425914.03
`- ploc 01e4491d-083f-48ba-8cdf-c5c8771e6b99 u2004-1 1593425914.04
|- plic 01e4491d-083f-48ba-8cdf-c5c8771e6b99 u2004-1 1593425914.04
`- ploc 01e4491d-083f-48ba-8cdf-c5c8771e6b92 u2004-1 1593425914.03
'''
with open(tmp_file, 'r') as output_file:
'\n' + output_file.read() == expected_output
assert '\n' + output_file.read() == expected_output

@staticmethod
def test_output_with_format_json(daemon_get, capture_stdout, tmp_file):
Expand Down

0 comments on commit 28b4d75

Please sign in to comment.