Fix or improv test resilience

This commit is contained in:
hakril
2024-10-24 17:32:20 +02:00
parent 92863f7944
commit 3de820046d
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ def test_symbols_module_info(symctx):
def test_symbols_search(symctx):
mod = symctx.load_file(path=u"c:\\windows\\system32\\ntdll.dll", addr=0x42000)
res = symctx.search(u"ntdll!*CreateFile")
assert set(s.name for s in res) == {"NtCreateFile", "ZwCreateFile"}
assert set(s.name for s in res) >= {"NtCreateFile", "ZwCreateFile"} # May have other names
def test_symbols(symctx):
+1 -1
View File
@@ -36,7 +36,7 @@ def test_token_user(curtok):
user_sid = curtok.user
assert user_sid
computername, username = windows.utils.lookup_sid(user_sid)
assert computername == windows.system.computer_name
assert computername.upper() == windows.system.computer_name.upper()
assert username == os.environ["USERNAME"]
def test_token_id(curtok):
+1 -1
View File
@@ -75,7 +75,7 @@ def test_get_object(name, cls):
# Todo: test
# - put_instance
@pytest.mark.parametrize("cmdline", [r"c:\windows\notepad.exe trolol.exe"])
@pytest.mark.parametrize("cmdline", [r"winver.exe test_string_pfw"])
def test_exec_method_Win32_Process_create(cmdline):
namespace = windows.system.wmi["root\\cimv2"]
win32_process_cls = namespace.get_object("Win32_Process")