o
    gj                     @   s@   d dl mZ d dlmZ deddfddZdeddfdd	ZdS )
    )	ClientAPI)UniqueConstraintErrorclientreturnNc              
   C   s   | j dddddd}z| j dddddd J d tyG } z!td| d|jd	 v s5t|ts<J W Y d }~d S W Y d }~d S d }~ww )
Ntest   )zhnsw:construction_efzhnsw:search_efzhnsw:M)namemetadataFExpected exceptionz2Collection creation failed as expected with error zalready existsr   )create_collection	Exceptionprintargs
isinstancer   r   
collectione r   X/var/www/visachat/venv/lib/python3.10/site-packages/chromadb/test/api/test_collection.py test_duplicate_collection_create   s$   

8r   c              
   C   sX   z
| j dd}J d ty+ } ztd| d|jd v s J W Y d }~d S d }~ww )Ntest101)r   Fr
   z2Collection deletion failed as expected with error zdoes not existr   )delete_collectionr   r   r   r   r   r   r   #test_not_existing_collection_delete   s   
 r   )chromadb.apir   chromadb.errorsr   r   r   r   r   r   r   <module>   s    
