From c033c77b487caeb9505217232add571f362f7afe Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 9 Feb 2020 13:02:40 +0100 Subject: all: delete session in tearDown() --- scripts/cli/test_interfaces.py | 2 ++ scripts/cli/test_system_login.py | 1 + scripts/cli/test_system_nameserver.py | 3 +++ 3 files changed, 6 insertions(+) diff --git a/scripts/cli/test_interfaces.py b/scripts/cli/test_interfaces.py index ad8e653ce..1b775e1fe 100755 --- a/scripts/cli/test_interfaces.py +++ b/scripts/cli/test_interfaces.py @@ -35,6 +35,8 @@ class BasicInterfaceTest: self.session.delete(self._base_path) self.session.commit() + del self.session + def test_add_description(self): """ Check if description can be added to interface """ for intf in self._interfaces: diff --git a/scripts/cli/test_system_login.py b/scripts/cli/test_system_login.py index aa26b3bec..88e5695e7 100755 --- a/scripts/cli/test_system_login.py +++ b/scripts/cli/test_system_login.py @@ -37,6 +37,7 @@ class TestSystemLogin(unittest.TestCase): self.session.delete(base_path + ['user', user]) self.session.commit() + del self.session def test_user(self): """ Check if user can be created and we can SSH to localhost """ diff --git a/scripts/cli/test_system_nameserver.py b/scripts/cli/test_system_nameserver.py index eba8acd80..07fc9494b 100755 --- a/scripts/cli/test_system_nameserver.py +++ b/scripts/cli/test_system_nameserver.py @@ -37,10 +37,13 @@ class TestSystemNameServer(unittest.TestCase): env = self.session.get_session_env() self.config = Config(session_env=env) + def tearDown(self): # Delete existing name servers self.session.delete(base_path) self.session.commit() + del self.session + def test_add_server(self): """ Check if server is added to resolv.conf """ for s in test_servers: -- cgit v1.2.3