관리-도구
편집 파일: test_handlers.cpython-39.opt-1.pyc
a f�Wc � @ s d Z ddlmZ ddlZe�e�ZddlZddlZddl Z ddl mZmZ ddl mZ ddlmZmZmZmZ ddlmZmZmZmZmZmZ ed�Zed �Zed �ZdZg d�Zg d �Z dd� Z!g d�Z"G dd� de�Z#G dd� de�Z$G dd� de�Z%e%�&d�Z'e%�&d�Z(G dd� de�Z)G dd� de�Z*e*�&d�Z+e*�&d�Z,G dd� de�Z-G dd � d e�Z.G d!d"� d"e�Z/G d#d$� d$e�Z0G d%d&� d&e�Z1G d'd(� d(e�Z2G d)d*� d*ee�Z3G d+d,� d,e�Z4G d-d.� d.e�Z5G d/d0� d0e�Z6G d1d2� d2e�Z7G d3d4� d4e�Z8G d5d6� d6e�Z9G d7d8� d8e�Z:G d9d:� d:e�Z;e;�&d�Z<e;�&d�Z=G d;d<� d<e�Z>e>�&d�Z?G d=d>� d>ee�Z@G d?d@� d@e�ZAeA�&d�ZBeA�&d�ZCG dAdB� dBee�ZDG dCdD� dDee�ZEG dEdF� dFe�ZFG dGdH� dHe�ZGG dIdJ� dJe�ZHG dKdL� dLe�ZIG dMdN� dNe�ZJG dOdP� dPe�ZKG dQdR� dRee�ZLG dSdT� dTe�ZMG dUdV� dVe�ZNG dWdX� dXe�ZOG dYdZ� dZee�ZPG d[d\� d\e�ZQeQ�&d�ZReQ�&d�ZSG d]d^� d^e�ZTG d_d`� d`e�ZUeU�&d�ZVeU�&d�ZWG dadb� dbe�ZXeX�&d�ZYeX�&d�ZZG dcdd� dde�Z[G dedf� dfe�Z\G dgdh� dhe�Z]dS )iz?passlib.tests.test_handlers - tests for passlib hash algorithms� )�with_statementN)�exc�hash)� repeat_string)�irange�PY3�u�get_method_function)�TestCase�HandlerCase� skipUnless� TEST_MODE�UserHandlerMixin�EncodingHandlerMixinu Ιωαννηςu €¥$u táБℓəs táБℓə)Z django_bcryptZdjango_bcrypt_sha256Z django_argon2)Z test_handlersZtest_handlers_argon2Ztest_handlers_bcryptZtest_handlers_ciscoZtest_handlers_djangoZtest_handlers_pbkdf2Ztest_handlers_scryptc C s� ddl m} || �}t|d�rX| tvrXz|�� }W n tjyH � Y n0 d| |f }nd| }tD ]B}d| }t|� t j | }zt||�W S ty� Y qd0 qdt d|| f ��dS ) al return HandlerCase instance for scheme, used by other tests. :param scheme: name of hasher to locate test for (e.g. "bcrypt") :raises KeyError: if scheme isn't known hasher. :raises MissingBackendError: if hasher doesn't have any available backends. :returns: HandlerCase subclass (which derives from TestCase) r )�get_crypt_handlerZbackendsz %s_%s_testz%s_testzpasslib.tests.z$can't find test case named %r for %rN)Zpasslib.registryr �hasattr�_omitted_backend_testsZget_backendr ZMissingBackendError�_handler_test_modules� __import__�sys�modules�getattr�AttributeError�RuntimeError)�schemer �handlerZbackend�name�module�modname�mod� r �?/usr/lib/python3.9/site-packages/passlib/tests/test_handlers.py�get_handler_case- s$ r"