Browse Source

Fix the sality-tests

The problem was related to the scapy imports and therefore
harder to detect.
Denis Waßmann 6 years ago
parent
commit
755d589d10
2 changed files with 2 additions and 3 deletions
  1. 2 2
      code/Test/TestUtil.py
  2. 0 1
      code/Test/test_pcap_comparator.py

+ 2 - 2
code/Test/TestUtil.py

@@ -1,7 +1,7 @@
 #!/usr/bin/python3
 
-import scapy.all
 import scapy.packet
+import scapy.utils
 import shlex
 import subprocess
 import os
@@ -11,7 +11,7 @@ import os
 # where exactly pcaps differ
 class PcapComparator:
     def compare_files(self, file: str, other_file: str):
-        self.compare_captures(scapy.all.rdpcap(file), scapy.all.rdpcap(other_file))
+        self.compare_captures(scapy.utils.rdpcap(file), scapy.utils.rdpcap(other_file))
 
     def compare_captures(self, packetsA, packetsB):
         if len(packetsA) != len(packetsB):

+ 0 - 1
code/Test/test_pcap_comparator.py

@@ -6,7 +6,6 @@ import time
 import unittest
 import random
 
-import scapy.all
 from Test.TestUtil import PcapComparator, ID2TExecution
 
 # this dictionary holds the generators (functions) for the parameters