Skip to content

Commit 93b0403

Browse files
committed
test: fix bad mocks
1 parent ce33ec0 commit 93b0403

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,16 @@ def test_search(get_sample):
4141

4242

4343
def test_call_proc(mocker):
44-
mocker.patch("getmac.utils.DEVNULL", "DEVNULL")
44+
mocker.patch("subprocess.DEVNULL", "DEVNULL")
4545
mocker.patch.object(gvars, "ENV", "ENV")
4646

4747
mocker.patch.object(consts, "WINDOWS", True)
48-
m = mocker.patch("getmac.utils.check_output", return_value="WINSUCCESS")
48+
m = mocker.patch("subprocess.check_output", return_value="WINSUCCESS")
4949
assert utils.call_proc("CMD", "arg") == "WINSUCCESS"
5050
m.assert_called_once_with("CMD arg", stderr="DEVNULL", env="ENV")
5151

5252
mocker.patch.object(consts, "WINDOWS", False)
53-
m = mocker.patch("getmac.utils.check_output", return_value="YAY")
53+
m = mocker.patch("subprocess.check_output", return_value="YAY")
5454
assert utils.call_proc("CMD", "arg1 arg2") == "YAY"
5555
m.assert_called_once_with(["CMD", "arg1", "arg2"], stderr="DEVNULL", env="ENV")
5656

0 commit comments

Comments
 (0)