
    hj%	                         U d Z ddlZddlZddlmZ ddlmZ ddlmZ g Ze	ej
                 ed<    ej        e e            d	e
          ZdZd Zd Zej        j        d             ZdS )zTest files upload method.    N   )_transformers)types   )pytest_helper
test_tablezt.t_file_name)fileglobals_for_filetest_methodr   )pytest_asyncioc                    t          j        | t                    5  | j                                        D ]}|j         nt          d          |j                            d          d         }t          j	        |j                  }t          j
        |          }|||j        |j        |j        ||fD ]}t          j        |          }||k    sJ 	 d d d            d S # 1 swxY w Y   d S )N%No files found with a `download_uri`./)uri)video)r   exception_if_vertex
ValueErrorfileslistdownload_urinamesplitr   VideoGeneratedVideor   tt_file_name)clientr	   file_idr   generated_videofr   s          j/var/www/app.qaans.com/backend/venv/lib/python3.11/site-packages/google/genai/tests/files/test_download.pytest_name_transform_namer#   '   sN   (<<  !!## @ @			& 
' >???iooc""2&GKD-...E*777O	 
 
 ]1dW_____
                 s   B;C$$C(+C(c                 ,   t          j        | t                    5  | j                                        D ]}|j         nt          d          | j                            |          }|dd         dk    sJ 	 d d d            d S # 1 swxY w Y   d S Nr   )r	         s   ftyp)r   r   r   r   r   r   downloadr   r	   contents      r"   test_basic_downloadr+   ?   s    (<< # #!!## @ @			& 
' >???l###..G1Q3<7"""""# # # # # # # # # # # # # # # # # #s   A B		BBc                 h  K   t          j        | t                    5  | j        j                                         d {V 2 3 d {V }|j         n6 t          d          | j        j                            |           d {V }|dd         dk    sJ 	 d d d            d S # 1 swxY w Y   d S r%   )r   r   r   aior   r   r   r(   r)   s      r"   test_basic_download_asyncr.   K   sA     (<< # #"J,1133333333 @ @ @ @ @ @ @d			& 
' 4 >???J$--4-88888888G1Q3<7"""""# # # # # # # # # # # # # # # # # #s   %B'AAB''B+.B+)__doc__pathlibpytest r   r   r   r   r   r   TestTableItem__annotations__setup__file__globals
pytestmarkpytest_pluginsr#   r+   markasyncior.        r"   <module>r>      s   "       " " " " " "             13
D,- 2 2 2 ] 	WYY	  
 %  0	# 	# 	# 	# 	# 	# 	# 	#r=   