
    5P@iF                        d Z ddlmZ ddlmZ ddlmZ  G d dej                        Ze	dk(  r ej                          yy)	zUnittest for py_utils.    )annotations)absltest)	sheets_idc                      e Zd Zd Zd Zy)SheetsIdentifierTestc                v   t        j                  d      }| j                  dt        |             t        j                  t        j                  d            }| j                  dt        |             t        j                  t        j
                  d            }| j                  dt        |             y )	Nhellonamez
name=hello)keyz	key=hellohttps://docs.google.com/)urlzurl=https://docs.google.com/)r   SheetsIdentifierassertEqualstr	SheetsKey	SheetsURL)selfsids     u/home/www/lebenam.kofcorporation.com/venv/lib/python3.12/site-packages/google/generativeai/notebook/sheets_id_test.pytest_constructorz%SheetsIdentifierTest.test_constructor   s    ((g6s3x0((Y-@-@-IJc#h/((Y-@-@A[-\]7SB    c                   | j                  t        d      5  t        j                          d d d        | j                  t        d      5  t        j                  d       d d d        | j                  t        d      5  t        j                  dt        j                  d             d d d        | j                  t        d      5  t        j                  dt        j                  d      t        j
                  d             d d d        y # 1 sw Y   xY w# 1 sw Y   xY w# 1 sw Y   xY w# 1 sw Y   y xY w)Nz(Must set exactly one of name, key or url r
   r	   )r   r   r   )r   r   r   )assertRaisesRegex
ValueErrorr   r   r   r   )r   s    r   test_constructor_errorz+SheetsIdentifierTest.test_constructor_error   s   ##J0Z[ 	)&&(	) ##J0Z[ 	0&&B/	0 ##J0Z[ 	W&&G9L9LW9UV	W ##J0Z[ 	&&''0''(BC	 		) 	)	0 	0	W 	W	 	s/   D
D?+D(?D4DD%(D14D=N)__name__
__module____qualname__r   r    r   r   r   r      s    Cr   r   __main__N)__doc__
__future__r   absl.testingr   google.generativeai.notebookr   TestCaser   r   mainr!   r   r   <module>r)      s?     " ! 28,, 8 zHMMO r   