diff options
author | Paul Vinciguerra <pvinci@vinciconsulting.com> | 2020-12-04 14:57:51 -0500 |
---|---|---|
committer | Ole Tr�an <otroan@employees.org> | 2020-12-07 08:17:10 +0000 |
commit | e061dad55e75ea5d5db20ceda28f557971dd9483 (patch) | |
tree | 178f317491a8c8b6f525a0d865cf45625fa36274 /src | |
parent | d6f221789d58374db4ea5368dde5e83f72e842c0 (diff) |
tests: py2 cleanup - remove subclassing of object
Type: refactor
Change-Id: I9096e3b473110350e1e8e5936e3c4c164f8969a7
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/ikev2/test/test_ikev2.py | 1 | ||||
-rw-r--r-- | src/plugins/nat/extras/nat_100ks.py | 2 | ||||
-rw-r--r-- | src/plugins/nat/extras/nat_10Ms.py | 2 | ||||
-rw-r--r-- | src/plugins/nat/extras/nat_10ks.py | 2 | ||||
-rw-r--r-- | src/plugins/nat/extras/nat_1Ms.py | 2 | ||||
-rw-r--r-- | src/plugins/nat/extras/nat_out2in_100ks.py | 2 | ||||
-rw-r--r-- | src/plugins/nat/extras/nat_out2in_10Ms.py | 2 | ||||
-rw-r--r-- | src/plugins/nat/extras/nat_out2in_10ks.py | 2 | ||||
-rw-r--r-- | src/plugins/nat/extras/nat_out2in_1Ms.py | 2 | ||||
-rw-r--r-- | src/plugins/nat/extras/nat_ses_open.py | 2 | ||||
-rw-r--r-- | src/plugins/nat/extras/nat_test_fast_path.py | 2 | ||||
-rw-r--r-- | src/plugins/nat/extras/nat_test_slow_path.py | 2 | ||||
-rw-r--r-- | src/plugins/nat/extras/nat_test_slow_path_with_latency.py | 2 |
13 files changed, 13 insertions, 12 deletions
diff --git a/src/plugins/ikev2/test/test_ikev2.py b/src/plugins/ikev2/test/test_ikev2.py index 073799072eb..3a1ab91f90d 100644 --- a/src/plugins/ikev2/test/test_ikev2.py +++ b/src/plugins/ikev2/test/test_ikev2.py @@ -12,6 +12,7 @@ from cryptography.hazmat.primitives.ciphers import ( modes, ) from ipaddress import IPv4Address, IPv6Address, ip_address +import unittest from scapy.layers.ipsec import ESP from scapy.layers.inet import IP, UDP, Ether from scapy.layers.inet6 import IPv6 diff --git a/src/plugins/nat/extras/nat_100ks.py b/src/plugins/nat/extras/nat_100ks.py index f54a6e8342d..c85a4591cd3 100644 --- a/src/plugins/nat/extras/nat_100ks.py +++ b/src/plugins/nat/extras/nat_100ks.py @@ -1,6 +1,6 @@ from trex_stl_lib.api import * -class STLS1(object): +class STLS1: def create_stream (self): base_pkt = Ether()/IP(dst="2.2.0.1")/UDP(dport=12) diff --git a/src/plugins/nat/extras/nat_10Ms.py b/src/plugins/nat/extras/nat_10Ms.py index 068ca5b54ba..6ce62a0b5e7 100644 --- a/src/plugins/nat/extras/nat_10Ms.py +++ b/src/plugins/nat/extras/nat_10Ms.py @@ -1,6 +1,6 @@ from trex_stl_lib.api import * -class STLS1(object): +class STLS1: def create_stream (self): base_pkt = Ether()/IP(dst="2.2.0.1")/UDP(dport=12) diff --git a/src/plugins/nat/extras/nat_10ks.py b/src/plugins/nat/extras/nat_10ks.py index 9bd7d8ffd6d..33c7196eb9e 100644 --- a/src/plugins/nat/extras/nat_10ks.py +++ b/src/plugins/nat/extras/nat_10ks.py @@ -1,6 +1,6 @@ from trex_stl_lib.api import * -class STLS1(object): +class STLS1: def create_stream (self): base_pkt = Ether()/IP(dst="2.2.0.1")/UDP(dport=12) diff --git a/src/plugins/nat/extras/nat_1Ms.py b/src/plugins/nat/extras/nat_1Ms.py index acee676043b..73a91a70985 100644 --- a/src/plugins/nat/extras/nat_1Ms.py +++ b/src/plugins/nat/extras/nat_1Ms.py @@ -1,6 +1,6 @@ from trex_stl_lib.api import * -class STLS1(object): +class STLS1: def create_stream (self): base_pkt = Ether()/IP(dst="2.2.0.1")/UDP(dport=12) diff --git a/src/plugins/nat/extras/nat_out2in_100ks.py b/src/plugins/nat/extras/nat_out2in_100ks.py index c1d42195f37..55ab5d42ee1 100644 --- a/src/plugins/nat/extras/nat_out2in_100ks.py +++ b/src/plugins/nat/extras/nat_out2in_100ks.py @@ -1,6 +1,6 @@ from trex_stl_lib.api import * -class STLS1(object): +class STLS1: def create_stream (self): base_pkt = Ether()/IP(src="2.2.0.1")/UDP(sport=12) diff --git a/src/plugins/nat/extras/nat_out2in_10Ms.py b/src/plugins/nat/extras/nat_out2in_10Ms.py index fbd0643569a..48d3d199080 100644 --- a/src/plugins/nat/extras/nat_out2in_10Ms.py +++ b/src/plugins/nat/extras/nat_out2in_10Ms.py @@ -1,6 +1,6 @@ from trex_stl_lib.api import * -class STLS1(object): +class STLS1: def create_stream (self): base_pkt = Ether()/IP(src="2.2.0.1")/UDP(sport=12) diff --git a/src/plugins/nat/extras/nat_out2in_10ks.py b/src/plugins/nat/extras/nat_out2in_10ks.py index 661381e8ec7..e961504fcf9 100644 --- a/src/plugins/nat/extras/nat_out2in_10ks.py +++ b/src/plugins/nat/extras/nat_out2in_10ks.py @@ -1,6 +1,6 @@ from trex_stl_lib.api import * -class STLS1(object): +class STLS1: def create_stream (self): base_pkt = Ether()/IP(src="2.2.0.1")/UDP(sport=12) diff --git a/src/plugins/nat/extras/nat_out2in_1Ms.py b/src/plugins/nat/extras/nat_out2in_1Ms.py index 54ca5d5bd11..d2cb0810263 100644 --- a/src/plugins/nat/extras/nat_out2in_1Ms.py +++ b/src/plugins/nat/extras/nat_out2in_1Ms.py @@ -1,6 +1,6 @@ from trex_stl_lib.api import * -class STLS1(object): +class STLS1: def create_stream (self): base_pkt = Ether()/IP(src="2.2.0.1")/UDP(sport=12) diff --git a/src/plugins/nat/extras/nat_ses_open.py b/src/plugins/nat/extras/nat_ses_open.py index 9f0f77e23f9..d614d4e7356 100644 --- a/src/plugins/nat/extras/nat_ses_open.py +++ b/src/plugins/nat/extras/nat_ses_open.py @@ -1,6 +1,6 @@ from trex_stl_lib.api import * -class STLS1(object): +class STLS1: def __init__ (self): self.ip_range = {'local': {'start': "10.0.0.3", 'end': "10.1.255.255"}, diff --git a/src/plugins/nat/extras/nat_test_fast_path.py b/src/plugins/nat/extras/nat_test_fast_path.py index 97f8525fdc6..e869d40872a 100644 --- a/src/plugins/nat/extras/nat_test_fast_path.py +++ b/src/plugins/nat/extras/nat_test_fast_path.py @@ -1,7 +1,7 @@ from trex_stl_lib.api import * -class STLS1(object): +class STLS1: def create_stream(self): # base_pkt = Ether()/IP(dst="2.2.0.1")/UDP(dport=12) diff --git a/src/plugins/nat/extras/nat_test_slow_path.py b/src/plugins/nat/extras/nat_test_slow_path.py index 6da2fe6f6b9..a6351b98adf 100644 --- a/src/plugins/nat/extras/nat_test_slow_path.py +++ b/src/plugins/nat/extras/nat_test_slow_path.py @@ -1,7 +1,7 @@ from trex_stl_lib.api import * -class STLS1(object): +class STLS1: def create_stream(self): # base_pkt = Ether()/IP(dst="2.2.0.1")/UDP(dport=12) diff --git a/src/plugins/nat/extras/nat_test_slow_path_with_latency.py b/src/plugins/nat/extras/nat_test_slow_path_with_latency.py index 066e491c906..6c7663434c5 100644 --- a/src/plugins/nat/extras/nat_test_slow_path_with_latency.py +++ b/src/plugins/nat/extras/nat_test_slow_path_with_latency.py @@ -1,7 +1,7 @@ from trex_stl_lib.api import * -class STLS1(object): +class STLS1: def create_stream(self, port_id): # base_pkt = Ether()/IP(dst="2.2.0.1")/UDP(dport=12) |