a
    !f                     @   sB   d dl Z G dd de jZG dd de jZG dd de jZdS )    Nc                   @   s$   e Zd Zdd Zdd Zdd ZdS )Test_ConfigurationPropertyc                 C   s   ddl m} |S )Nr   )_ConfigurationProperty)gcloud.bigquery._helpersr   )selfr    r   ^/var/www/html/python-backend/venv/lib/python3.9/site-packages/gcloud/bigquery/test__helpers.py_getTargetClass   s    z*Test_ConfigurationProperty._getTargetClassc                 O   s   |   |i |S Nr   r   argskwr   r   r   _makeOne   s    z#Test_ConfigurationProperty._makeOnec                    s   G dd dt  G  fdddt }|jjd | }|jd  t  }||_|j|u  |jj|u  |`|jd  |jjd  d S )Nc                   @   s   e Zd ZdZdS )z9Test_ConfigurationProperty.test_it.<locals>.ConfigurationN__name__
__module____qualname___attrr   r   r   r   Configuration   s   r   c                       s"   e Zd ZdZ fddZdS )z3Test_ConfigurationProperty.test_it.<locals>.Wrapperattrc                    s     | _ d S r	   _configurationr   r   r   r   __init__#   s    z<Test_ConfigurationProperty.test_it.<locals>.Wrapper.__init__N)r   r   r   r   r   r   r   r   r   r   r   Wrapper    s   
r   r   )objectassertEqualr   name
assertTruer   r   )r   r   wrappervaluer   r   r   test_it   s    z"Test_ConfigurationProperty.test_itNr   r   r   r   r   r#   r   r   r   r   r      s   r   c                   @   s$   e Zd Zdd Zdd Zdd ZdS )Test_TypedPropertyc                 C   s   ddl m} |S )Nr   )_TypedProperty)r   r&   )r   r&   r   r   r   r   7   s    z"Test_TypedProperty._getTargetClassc                 O   s   |   |i |S r	   r
   r   r   r   r   r   ;   s    zTest_TypedProperty._makeOnec                    s   G dd dt  G  fdddt }| }t d|_W d    n1 sR0    Y  d|_|jd |jjd |`|jd  |jjd  d S )Nc                   @   s   e Zd ZdZdS )z1Test_TypedProperty.test_it.<locals>.ConfigurationNr   r   r   r   r   r   @   s   r   c                       s$   e Zd ZdeZ fddZdS )z+Test_TypedProperty.test_it.<locals>.Wrapperr   c                    s     | _ d S r	   r   r   r   r   r   r   F   s    z4Test_TypedProperty.test_it.<locals>.Wrapper.__init__N)r   r   r   r   intr   r   r   r   r   r   r   C   s   r   BOGUS*   )r   assertRaises
ValueErrorr   r   r   r   r   r   r!   r   r   r   r#   >   s    $zTest_TypedProperty.test_itNr$   r   r   r   r   r%   5   s   r%   c                   @   s   e Zd Zdd Zdd ZdS )Test_EnumPropertyc                 C   s   ddl m} |S )Nr   )_EnumProperty)r   r.   )r   r.   r   r   r   r   X   s    z!Test_EnumProperty._getTargetClassc                    s   G dd d|   G dd dt G  fdddt}| }| t d|_W d    n1 sf0    Y  d|_| |jd | |jjd |`| |jd  | |jjd  d S )	Nc                   @   s   e Zd ZdZdS )z&Test_EnumProperty.test_it.<locals>.Sub)FOOZBARZBAZN)r   r   r   ZALLOWEDr   r   r   r   Sub^   s   r0   c                   @   s   e Zd ZdZdS )z0Test_EnumProperty.test_it.<locals>.ConfigurationNr   r   r   r   r   r   a   s   r   c                       s    e Zd ZdZ fddZdS )z*Test_EnumProperty.test_it.<locals>.Wrapperr   c                    s     | _ d S r	   r   r   r   r   r   r   g   s    z3Test_EnumProperty.test_it.<locals>.Wrapper.__init__N)r   r   r   r   r   r   r   r0   r   r   r   d   s   r   r(   r/   )r   r   r*   r+   r   r   r   r   r,   r   r1   r   r#   \   s    $zTest_EnumProperty.test_itN)r   r   r   r   r#   r   r   r   r   r-   V   s   r-   )Z	unittest2ZTestCaser   r%   r-   r   r   r   r   <module>   s   #!