B
    	²ô`Z  ã               @   sN   d dl Z d dlmZ d dlmZ d Ze jddddd„ ƒZe  ¡ d	d
„ ƒZdS )é    N)ÚFaker)ÚDEFAULT_LOCALEÚsessionT)ZscopeZautousec             C   s&   d| j kr|  d¡}ntg}t|dS )zÖFixture that stores the session level ``Faker`` instance.

    This fixture is internal and is only meant for use within the project.
    Third parties should instead use the ``faker`` fixture for their tests.
    Zfaker_session_locale)Úlocale)ÚfixturenamesÚgetfixturevaluer   r   )Úrequestr   © r	   úJ/home/dcms/DCMS/lib/python3.7/site-packages/faker/contrib/pytest/plugin.pyÚ_session_faker	   s    
r   c             C   s\   d| j kr |  d¡}t|d}n
|  d¡}t}d| j krB|  d¡}|j|d |j ¡  |S )z>Fixture that returns a seeded and suitable ``Faker`` instance.Zfaker_locale)r   r   Z
faker_seed)Úseed)r   r   r   ÚDEFAULT_SEEDZseed_instanceÚuniqueÚclear)r   r   Zfaker   r	   r	   r
   Úfaker   s    





r   )Zpytestr   r   Zfaker.configr   r   Zfixturer   r	   r	   r	   r
   Ú<module>   s
   