o
    YiY                     @   s   d Z ddlmZ ddlZddlmZmZ ddlmZ ddlm	Z
 dd	lmZ ddlZejjejd
dddd Zejjejjejd
dddd Zejee g dZdS )z%Tests for Interactions API URL paths.    )mockN)RequestResponse   )AsyncHttpxClient)Client   )pytest_helperdefaultT)Zautospecc                 C   s  d}t  }d|_d|_d|_|df| _|jjr*d|jj d|jj	 d|jj }nd	}t j
td
}tdtddd|_|jj|d |  |jd d }t|j| d| ks^J |  tdtddd|_|jj|d |  |jd d }t|j| d| dksJ |  tdtddd|_|jj|d |  |jd d }t|j| d| ksJ W d    d S 1 sw   Y  d S Nztest-interaction-idz
test-tokenFztest-quota-projectztest-projectzhttps://z,-aiplatform.googleapis.com/v1beta1/projects/z/locations/z0https://generativelanguage.googleapis.com/v1betasend   GET )request)idr   z/interactions/POSTz/cancelDELETE)r   Mocktokenexpiredquota_project_idreturn_value_api_clientvertexailocationprojectpatchobject
HTTPClientr   r   interactionsgetassert_called_once	call_argsstrurl
reset_mockcanceldeleteZmock_auth_defaultclientZinteraction_idZ
mock_credsZexpected_base_urlZ	mock_sendr    r+   d/home/kim/smarthome/.venv/lib/python3.10/site-packages/google/genai/tests/interactions/test_paths.pytest_interactions_paths   s8   
$"r-   c                    s  d}t  }d|_d|_d|_|df| _|jjr+d|jj d|jj	 d|jj }nd	}t j
td
}tdtddd|_|jjj|dI d H  |  |jd d }t|j| d| kscJ |  tdtddd|_|jjj|dI d H  |  |jd d }t|j| d| dksJ |  tdtddd|_|jjj|dI d H  |  |jd d }t|j| d| ksJ W d    d S 1 sw   Y  d S r   )r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   Zaior    r!   r"   r#   r$   r%   r&   r'   r(   r)   r+   r+   r,   test_async_interactions_paths@   s:   
$"r.   )fileZglobals_for_fileZ
test_table)__doc__Zunittestr   ZpytestZhttpxr   r   r   r   r   r   r   r	   Zgoogle.authgoogler   r   authr-   markZasyncior.   setup__file__globalsZ
pytestmarkr+   r+   r+   r,   <module>   s$   
##
