
    עi                        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j0                  dk\  rej                  j3                  d      Znej                  j3                  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jH                  e% e&       d.e!/      gZ'd0Z(ejR                  jT                  d1        Z+y)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_cmekznot supported)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                   K   | j                   j                  rnt        j                  t              5  | j
                  j                  j                  t        j                  t        j                         d {    d d d        y | j
                  j                  j                  t        j                  t        j                         d {    y 7 Y# 1 sw Y   y xY w7 w)Nr   )_api_clientvertexaipytestraises	Exceptionaiocachescreate/_CREATE_CACHED_CONTENT_PARAMETERS_GOOGLEAI_FILEr   r   )clients    f/sites/domain-asset-master/.venv/lib/python3.12/site-packages/google/genai/tests/caches/test_create.pytest_async_googleai_file_creater9      s       	y	! JJ$$?EE@GG %     **


"
"=CC>EE #    s<   0C#AC9C:C>AC#C!C#CCC#),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,P
 EMMEJJ!/$`%6" EJJ!/$^%6"
& *akk*LM$-- )8 3W%2V2V
 EMMEJJ!/%6$i"

 *akk*LM$!3 /, =E-= 9  : ? =E-= 9 0 : ? CK3C ?  @ E 2:-2 . \ / 5 5 B w""001GH,""001LM,8@-9 5 DH 5 < < @ 6 < < H  6 < < I ?G3? ; JN ; B B F < B B N  < B B O   M.-<
  M3*.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[   