Files
Jurriaan Bremer 773c6fc854 get rid of capcom usage for disabling dse
In the past we've attempted to use Capcom to disable Driver Signature
Enforcement. With a more permanent solution upcoming, it is safe to
remove this functionality.
2017-11-09 08:45:26 +01:00

22 lines
593 B
Python

# Copyright (C) 2017 Cuckoo Foundation.
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.
import mock
import os.path
from lib.core.driver import Driver
@mock.patch("os.path.exists")
@mock.patch("shutil.copy")
def test_copy_driver(p, q):
d = Driver("foo", "bar")
d.is_64bit = True
d.copy_driver()
q.assert_called_once_with("bin\\foo-x64.sys")
sysroot = os.path.expandvars("%SystemRoot%")
p.assert_called_once_with(
"bin\\foo-x64.sys", "%s\\sysnative\\drivers\\bar.sys" % sysroot
)