<s> import unittest <EOL> from uuid import uuid4 <EOL> from toto . secret import * <EOL> class TestSecret ( unittest . TestCase ) : <EOL> def test_password_hash ( self ) : <EOL> pw = uuid4 ( ) . hex <EOL> self . assertTrue ( pw != password_hash ( pw ) ) <EOL> self . assertTrue ( password_hash ( pw ) != password_hash ( pw + uuid4 ( ) . hex ) ) <EOL> self . assertTrue ( password_hash ( pw ) != password_hash ( uuid4 ( ) . hex ) ) <EOL> self . assertTrue ( password_hash ( pw ) != password_hash ( pw ) ) <EOL> def test_verify_password ( self ) : <EOL> pw = uuid4 ( ) . hex <EOL> pw_hash = password_hash ( pw ) <EOL> self . assertTrue ( not verify_password ( '<STR_LIT>' , pw_hash ) ) <EOL> self . assertTrue ( not verify_password ( pw + uuid4 ( ) . hex , pw_hash ) ) <EOL> self . assertTrue ( not verify_password ( uuid4 ( ) . hex , pw_hash ) ) <EOL> self . assertTrue ( verify_password ( pw , pw_hash ) ) </s>
