MCPcopy
hub / github.com/srixivas/PcapXray / test_device_details_creates_file

Method test_device_details_creates_file

Test/test_unit.py:371–381  ·  view source on GitHub ↗
(self, tmp_path)

Source from the content-addressed store, hash-verified

369 assert "dns.google" in out.read_text()
370
371 def test_device_details_creates_file(self, tmp_path):
372 memory.lan_hosts["AA:BB:CC:DD:EE:FF"] = LanHost(
373 ip="192.168.1.5",
374 device_vendor="VendorX",
375 node="192.168.1.5\nAA.BB.CC.DD.EE.FF\nVendorX",
376 )
377 gen = report_generator.ReportGenerator(str(tmp_path), "unit")
378 gen.deviceDetailsReport()
379 out = tmp_path / "Report" / "unit_device_details.txt"
380 assert out.exists()
381 assert "VendorX" in out.read_text()
382
383 def test_creates_report_directory_if_missing(self, tmp_path):
384 gen = report_generator.ReportGenerator(str(tmp_path / "nested" / "path"), "unit")

Callers

nothing calls this directly

Calls 2

deviceDetailsReportMethod · 0.95
LanHostClass · 0.90

Tested by

no test coverage detected