From a68a9eb9873c7502c2b7bddb55c4eb61689a48a2 Mon Sep 17 00:00:00 2001 From: stuppie Date: Mon, 9 Mar 2026 18:42:22 -0600 Subject: add IPLabel, NmapRun, RDNSResult, ToolRun, model/managers/tests. nmap xml parser. + test. work in progress --- tests/conftest.py | 1 + tests/data/nmaprun1.xml | 68 +++++++++++++ tests/data/nmaprun2.xml | 118 ++++++++++++++++++++++ tests/managers/network/__init__.py | 0 tests/managers/network/label.py | 202 +++++++++++++++++++++++++++++++++++++ tests/managers/network/tool_run.py | 48 +++++++++ tests/models/network/__init__.py | 0 tests/models/network/nmap.py | 32 ++++++ tests/models/network/rdns.py | 23 +++++ tests/models/network/tool_run.py | 8 ++ 10 files changed, 500 insertions(+) create mode 100644 tests/data/nmaprun1.xml create mode 100644 tests/data/nmaprun2.xml create mode 100644 tests/managers/network/__init__.py create mode 100644 tests/managers/network/label.py create mode 100644 tests/managers/network/tool_run.py create mode 100644 tests/models/network/__init__.py create mode 100644 tests/models/network/nmap.py create mode 100644 tests/models/network/rdns.py create mode 100644 tests/models/network/tool_run.py (limited to 'tests') diff --git a/tests/conftest.py b/tests/conftest.py index 30ed1c7..2482269 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -13,6 +13,7 @@ pytest_plugins = [ "test_utils.managers.conftest", "test_utils.managers.contest.conftest", "test_utils.managers.ledger.conftest", + "test_utils.managers.network.conftest", "test_utils.managers.upk.conftest", # -- Models "test_utils.models.conftest", diff --git a/tests/data/nmaprun1.xml b/tests/data/nmaprun1.xml new file mode 100644 index 0000000..c5fed6c --- /dev/null +++ b/tests/data/nmaprun1.xml @@ -0,0 +1,68 @@ + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/data/nmaprun2.xml b/tests/data/nmaprun2.xml new file mode 100644 index 0000000..932896c --- /dev/null +++ b/tests/data/nmaprun2.xml @@ -0,0 +1,118 @@ + + + + + + + + + + +
+ + + + + + + + + + + + cpe:/a:openbsd:openssh:6.6.1p1 + cpe:/o:linux:linux_kernel + + + + + + + + + + + cpe:/a:apache:http_server:2.4.7 + + + + + + + + + + + + + + + + + + + + cpe:/o:linux:linux_kernel:2.6 + + + cpe:/o:linux:linux_kernel:3 + + + + + +