Skip to content

Commit

Permalink
[cuegui] Fix test_kill unit test to become user agnostic (#1506)
Browse files Browse the repository at this point in the history
The previous version of the test would only work if executed by root
  • Loading branch information
DiegoTavares authored Sep 6, 2024
1 parent 7ebecc0 commit 7dbefee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cuegui/tests/MenuActions_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

import unittest

import getpass
import mock
import qtpy.QtGui
import qtpy.QtWidgets
Expand Down Expand Up @@ -975,10 +976,10 @@ def test_kill(self, isPermissibleMock, yesNoMock):
frame = opencue.wrappers.frame.Frame(opencue.compiled_proto.job_pb2.Frame(name=frame_name))

self.frame_actions.kill(rpcObjects=[frame])

username = getpass.getuser()
self.job.killFrames.assert_called_with(
name=[frame_name],
reason="Manual Frame(s) Kill Request in Cuegui by root")
reason="Manual Frame(s) Kill Request in Cuegui by %s" % username)

@mock.patch('cuegui.Utils.questionBoxYesNo', return_value=True)
def test_markAsWaiting(self, yesNoMock):
Expand Down

0 comments on commit 7dbefee

Please sign in to comment.