From 19095f0e2f38bbffc65d5ad576a120feb81b6094 Mon Sep 17 00:00:00 2001 From: hakril Date: Thu, 2 Aug 2018 18:52:35 +0200 Subject: [PATCH] Fix typo in certificate test + add very simple test of windows.system.modules --- tests/test_crypto.py | 2 +- tests/test_system.py | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/test_crypto.py b/tests/test_crypto.py index 7b85ff3..63b5092 100644 --- a/tests/test_crypto.py +++ b/tests/test_crypto.py @@ -116,7 +116,7 @@ def test_certificate(rawcert): assert cert.serial == '1b 8e 94 cb 0b 3e eb b6 41 39 f3 c9 09 b1 6b 46' assert cert.name == 'PythonForWindowsTest' assert cert.issuer == 'PythonForWindowsTest' - assert cert.thumprint == 'EF 0C A8 C9 F9 E0 96 AF 74 18 56 8B C1 C9 57 27 A0 89 29 6A' + assert cert.thumbprint == 'EF 0C A8 C9 F9 E0 96 AF 74 18 56 8B C1 C9 57 27 A0 89 29 6A' assert cert.encoded == rawcert assert cert.version == 2 assert cert == cert diff --git a/tests/test_system.py b/tests/test_system.py index 49df96c..5f8f534 100644 --- a/tests/test_system.py +++ b/tests/test_system.py @@ -44,6 +44,9 @@ class TestSystemWithCheckGarbage(object): proc = handle.process assert proc.pid == handle.dwProcessId + def test_system_modules_ntosk(self): + assert windows.system.modules[0].name.endswith("ntoskrnl.exe") + @check_for_gc_garbage class TestSystemWithCheckGarbageAndHandleLeak(object): @@ -52,4 +55,7 @@ class TestSystemWithCheckGarbageAndHandleLeak(object): def test_processes(self): procs = windows.system.processes - assert windows.current_process.pid in [p.pid for p in procs] \ No newline at end of file + assert windows.current_process.pid in [p.pid for p in procs] + + def test_system_modules(self): + return windows.system.modules \ No newline at end of file