-
-
Save RonnyPfannschmidt/4408514 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
import pytest | |
import os | |
import random | |
@pytest.fixture(params=xrange(10)) | |
def password(): | |
return os.urandom(random.randrange(6, 10)).encode("hex") | |
@pytest.fixture | |
def pw_hash(password): | |
return hash(password) | |
def test_verify_pw_hash(pw_hash, password): | |
assert pw_hash == hash(password), "%r != hash(%r)" % (pw_hash, password) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment