
    hjD                     r   U d dl mZ d dlZd dlZd dlZddlmZ ddlmZ ddlmZ	  ej
        d ej        d	 ej         ej        d
d                     ej         ej        dd                    g          g e	j        d          ddd          Z ej
        d ej        d	 ej         ej        dd                    g          g e	j        d          ddd          Z ee          Zde_         ee          Zde_         ee          Zde_         ee          Zdej        _        ej        dk    rej                            d          Znej                            d          Z ee          Zdej        _        eej        _        dej        _         ee          Zdej        _        eej        _        dej        _         ej         dde           ej         d d!de"           ej         d#de           ej         d$de           ej         d%d&e           ej         d'd(ed)*           ej         d+d(ed)*           ej         d,d(ed)*          gZ!e"ej                  e#d-<    ej$        e% e&            d.e!/          gZ'd0Z(ej)        j*        d1             Z+dS )2    )deepcopyN   )types   )pytest_helper)_transformerszgemini-2.5-flashuserz:gs://cloud-samples-data/generative-ai/pdf/2312.11805v3.pdfzapplication/pdf)fileUrimimeType)fileDataz8gs://cloud-samples-data/generative-ai/pdf/2403.05530.pdf)rolepartsz What is the sum of the two pdfs?z
test cache86400s)contentssystem_instructiondisplay_namettlmodelconfigzChttps://generativelanguage.googleapis.com/v1beta/files/v200dhvn15h7)r   r
   zmodels/gemini-2.5-flashz)publishers/google/models/gemini-2.5-flashzUprojects/test-project/locations/us-central1/keyRings/test-keyring/cryptoKeys/test-key)r      z2025-12-20T00:00:00Zz2025-12-20T00:00:00+00:00test_caches_create_with_gcs_uriINVALID_ARGUMENT)nameexception_if_mldev
parameters$test_caches_create_with_gcs_uri_cmekz7only supported in Gemini Enterprise Agent Platform mode)r   r   exception_if_vertexr   +test_caches_create_with_gcs_uri_expire_time'test_caches_create_model_partial_path_1'test_caches_create_model_partial_path_2404%test_caches_create_with_googleai_fileInternalz+Create is not reproducible in the API mode.)r   r   r   skip_in_api_mode1test_caches_create_with_googleai_file_expire_time:test_caches_create_with_googleai_file_model_partial_path_1
test_tablezcaches.create)fileglobals_for_filetest_methodr(   )pytest_asyncioc                 v  K   | j         j        rot          j        t                    5  | j        j                            t          j	        t          j
                   d {V  d d d            d S # 1 swxY w Y   d S | j        j                            t          j	        t          j
                   d {V  d S )Nr   )_api_clientvertexaipytestraises	Exceptionaiocachescreate/_CREATE_CACHED_CONTENT_PARAMETERS_GOOGLEAI_FILEr   r   )clients    i/var/www/app.qaans.com/backend/venv/lib/python3.11/site-packages/google/genai/tests/caches/test_create.pytest_async_googleai_file_creater9      s,       
	y	!	!  J$$?E@G %                           *

"
"=C>E #           s   <A11A58A5),copyr   datetimer0   sys r   r   r   t_CreateCachedContentParametersContentPartFileData	t_content)_CREATE_CACHED_CONTENT_PARAMETERS_GCS_URIr6   9_CREATE_CACHED_CONTENT_PARAMETERS_GCS_URI_PARTIAL_MODEL_1r   9_CREATE_CACHED_CONTENT_PARAMETERS_GCS_URI_PARTIAL_MODEL_2?_CREATE_CACHED_CONTENT_PARAMETERS_GOOGLEAI_FILE_PARTIAL_MODEL_1._CREATE_CACHED_CONTENT_PARAMETERS_GCS_URI_CMEKr   kms_key_nameversion_infofromisoformat_EXPIRE_TIME5_CREATE_CACHED_CONTENT_PARAMETERS_GCS_URI_EXPIRE_TIMEr   expire_timer   ;_CREATE_CACHED_CONTENT_PARAMETERS_GOOGLEAI_FILE_EXPIRE_TIMETestTableItemr(   list__annotations__setup__file__globals
pytestmarkpytest_pluginsmarkasyncior9        r8   <module>r\      s  "          



             " " " " " " -QE,P
 EMEJ!/$`%6" " "   EJ!/$^%6" " "    
& *ak*LMM$- - - - )8 3W%2V
 EMEJ!/%6$i" " "  
 
 

 *ak*LMM$! 3 3 3 /, =EH-= = 9  : ? =EH-= = 9 0 : ? CK(3C C ?  @ E 2:-2 2 . \ / 5 B w"001GHH,,"001LMM,8@-9 9 5 DH 5 < @ 6 < H  6 < I ?Gh3? ? ; JN ; B F < B N  < B O   M.-<  
  M3T.A	    M:-H  
  M6-L  
  M6 L  
  M4&BF	    M@&NF	    MI&RF	  O-1
D,- - - -^ M #	  
 %     r[   