summaryrefslogtreecommitdiff
path: root/smoketest
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-04-10 18:38:39 +0200
committerChristian Poessinger <christian@poessinger.com>2022-04-10 18:38:39 +0200
commitcb8306cb2efd88e633111bb1455f9c22d9c0f8a9 (patch)
treebe37760bc06ef9092c1719b615d67a2c396dbfbd /smoketest
parent869c34b9c2c2a2bee142f7010be40419cce01433 (diff)
downloadvyos-1x-cb8306cb2efd88e633111bb1455f9c22d9c0f8a9.tar.gz
vyos-1x-cb8306cb2efd88e633111bb1455f9c22d9c0f8a9.zip
smoketest: nat: use setUpClass() over setUp()
Diffstat (limited to 'smoketest')
-rwxr-xr-xsmoketest/scripts/cli/test_nat.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/smoketest/scripts/cli/test_nat.py b/smoketest/scripts/cli/test_nat.py
index 75c628244..2e1b8d431 100755
--- a/smoketest/scripts/cli/test_nat.py
+++ b/smoketest/scripts/cli/test_nat.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
#
-# Copyright (C) 2020 VyOS maintainers and contributors
+# Copyright (C) 2020-2022 VyOS maintainers and contributors
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 or later as
@@ -14,7 +14,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-import os
import jmespath
import json
import unittest
@@ -29,10 +28,13 @@ src_path = base_path + ['source']
dst_path = base_path + ['destination']
class TestNAT(VyOSUnitTestSHIM.TestCase):
- def setUp(self):
+ @classmethod
+ def setUpClass(cls):
+ super(cls, cls).setUpClass()
+
# ensure we can also run this test on a live system - so lets clean
# out the current configuration :)
- self.cli_delete(base_path)
+ cls.cli_delete(cls, base_path)
def tearDown(self):
self.cli_delete(base_path)