Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions test/common/executor_test.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import subprocess
import unittest
from unittest.mock import patch, MagicMock
import subprocess

from valhalla.common.executor import Executor


class ExecutorTest(unittest.TestCase):

@patch('subprocess.run')
Expand All @@ -21,7 +23,7 @@ def test_run_success(self, mock_run):
self.assertEqual(result.returncode, 0)
self.assertEqual(result.stdout, "output")
self.assertEqual(result.stderr, "")
mock_run.assert_called_once_with("ls", shell=True, check=True, capture_output=True, text=True)
mock_run.assert_called_once_with("ls", shell=True, executable='/bin/bash', check=True, capture_output=True, text=True)

@patch('subprocess.run')
def test_run_error(self, mock_run):
Expand Down
Loading