Skip to content

Commit 19b612c

Browse files
committed
Replace crypt with passlib in testing
1 parent 54f3b5c commit 19b612c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

test-requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ types-paramiko
55
salt
66
pywinrm
77
ansible
8+
passlib

test/test_modules.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
# See the License for the specific language governing permissions and
1111
# limitations under the License.
1212

13-
import crypt
1413
import datetime
1514
import os
1615
import re
1716
import time
1817
from ipaddress import IPv4Address, IPv6Address, ip_address
18+
from passlib.hash import sha512_crypt
1919

2020
import pytest
2121

@@ -246,7 +246,7 @@ def test_nonexistent_user(host):
246246
def test_current_user(host):
247247
assert host.user().name == "root"
248248
pw = host.user().password
249-
assert crypt.crypt("foo", pw) == pw
249+
assert sha512_crypt.verify("foo", pw)
250250

251251

252252
def test_group(host):

0 commit comments

Comments
 (0)