Skip to content

Commit

Permalink
Replace crypt with passlib in testing
Browse files Browse the repository at this point in the history
  • Loading branch information
martinhoyer committed May 7, 2024
1 parent 54f3b5c commit 208ba1d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ types-paramiko
salt
pywinrm
ansible
passlib
4 changes: 2 additions & 2 deletions test/test_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import crypt
import datetime
import os
import re
import time
from ipaddress import IPv4Address, IPv6Address, ip_address

import pytest
from passlib.hash import sha512_crypt

from testinfra.modules.socket import parse_socketspec

Expand Down Expand Up @@ -246,7 +246,7 @@ def test_nonexistent_user(host):
def test_current_user(host):
assert host.user().name == "root"
pw = host.user().password
assert crypt.crypt("foo", pw) == pw
assert sha512_crypt.verify("foo", pw)


def test_group(host):
Expand Down

0 comments on commit 208ba1d

Please sign in to comment.