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

Method test_packet_details_creates_file

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

Source from the content-addressed store, hash-verified

351
352class TestReportGenerator:
353 def test_packet_details_creates_file(self, tmp_path):
354 memory.packet_db["10.0.0.1/8.8.8.8/53"] = PacketSession(
355 Payload={"forward": ["data"], "reverse": []}
356 )
357 gen = report_generator.ReportGenerator(str(tmp_path), "unit")
358 gen.packetDetails()
359 out = tmp_path / "Report" / "unit_packet_details.txt"
360 assert out.exists()
361 assert "10.0.0.1/8.8.8.8/53" in out.read_text()
362
363 def test_communication_details_creates_file(self, tmp_path):
364 memory.destination_hosts["8.8.8.8"] = DestinationHost(domain_name="dns.google")

Callers

nothing calls this directly

Calls 2

packetDetailsMethod · 0.95
PacketSessionClass · 0.90

Tested by

no test coverage detected