Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianfr committed Oct 23, 2023
1 parent 7e3e5d1 commit 84b67d3
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions api/py/test/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,15 +266,5 @@ def mock_check_output_with_app_other_user(cmd):
monkeypatch.setattr(run, 'check_output', mock_check_output_with_app_other_user)
assert "<kill app cmd>" not in calls
runner = run.Runner(parse_args, 'some.jar')
with pytest.raises(AssertionError):
with pytest.raises(RuntimeError):
runner.run()
def mock_check_output_with_app_current_user(cmd):
current = os.getlogin()
return json.dumps(
{"app_name": streaming_app_name, "kill_cmd": "<kill app cmd>", "user": current}
).encode('utf8')
monkeypatch.setattr(run, 'check_output', mock_check_output_with_app_current_user)
assert "<kill app cmd>" not in calls
runner = run.Runner(parse_args, 'some.jar')
runner.run()
assert "<kill app cmd>" in calls

0 comments on commit 84b67d3

Please sign in to comment.