summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli/test_service_ssh.py
diff options
context:
space:
mode:
Diffstat (limited to 'smoketest/scripts/cli/test_service_ssh.py')
-rwxr-xr-xsmoketest/scripts/cli/test_service_ssh.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/smoketest/scripts/cli/test_service_ssh.py b/smoketest/scripts/cli/test_service_ssh.py
index 4ef3dd51d..8cd4a2178 100755
--- a/smoketest/scripts/cli/test_service_ssh.py
+++ b/smoketest/scripts/cli/test_service_ssh.py
@@ -19,12 +19,11 @@ import paramiko
import re
import unittest
-from pwd import getpwall
-
from base_vyostest_shim import VyOSUnitTestSHIM
from vyos.configsession import ConfigSessionError
from vyos.defaults import config_files
+from vyos.utils.auth import get_local_passwd_entries
from vyos.utils.process import cmd
from vyos.utils.process import is_systemd_service_running
from vyos.utils.process import process_named_running
@@ -311,7 +310,7 @@ class TestServiceSSH(VyOSUnitTestSHIM.TestCase):
self.cli_commit()
# After deletion the test user is not allowed to remain in /etc/passwd
- usernames = [x[0] for x in getpwall()]
+ usernames = [x.pw_name for x in get_local_passwd_entries()]
self.assertNotIn(test_user, usernames)
def test_ssh_dynamic_protection(self):