
    tni                     P    d Z ddlZddlZddlmZmZ  G d dej                  ZdS )z1
Test shared functions related to authentication
    N)	mock_openpatchc                   D    e Zd ZdZdZ edee          d             ZdS )
TestAPIKeyzTest the API keys2   
    [default]
    api_key = "RUNPOD_API_KEY"
    zbuiltins.open)new_callable	read_datac                 ~    ddl }t          j        |           |                     |j        d           |j        sJ dS )zI
        Test that the API key is read from the credentials file
        r   NRUNPOD_API_KEY)runpod	importlibreloadassertEqualapi_keycalled)self	mock_filer   s      X/var/www/html/gpu-tools/venv/lib/python3.11/site-packages/tests/test_shared/test_auth.pytest_use_file_credentialsz$TestAPIKey.test_use_file_credentials   sL    
 	   )9:::    N)__name__
__module____qualname____doc__CREDENTIALSr   r   r    r   r   r   r   
   sO        K
 U?kJJJ    KJ     r   r   )r   r   unittestunittest.mockr   r   TestCaser   r   r   r   <module>r      su          * * * * * * * *         "          r   