o
    j:                     @   s  d dl mZ d dlZd dlZeeZd dlZd dlZd dl	Z	d dl
Z
d dlmZ d dlmZ ejs4eZd dlmZ d dlmZ d dlmZ d dlmZ d dlZd dlZd d	lm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$m%Z%m&Z& d dl'm(Z( d dl)m*Z*m+Z+ d dl,m-Z- d dl,m.Z. d dl/m0Z0 d dl1m2Z2 d dl)m3Z3 d dl4m5Z5 d dl4m6Z6 d dl4m7Z7 d dl4m8Z8 d dl4m9Z9 d dl4m:Z: d dl4m;Z; d dl4m<Z< d dl4m=Z= d dl4m>Z> d d l4m?Z? d d!l4m@Z@ d d"l4mAZA d d#l4mBZB d d$l4mCZC d d%l4mDZD d d&l4mEZE d d'l4mFZF d d(l4mGZG d d)l4mHZH d d*l4mIZI d d+l4mJZJ d d,l4mKZK d d-l4mLZL d.d/ ZMd4d0d1ZN		d5d2d3ZOdS )6    )unicode_literalsN)six)get_object_as_dict)datetime)date)time)	timedelta)E)MethodContextIgnoredService)
ServerBase)Application)srpcrpc)ValidationError)binary_encoding_handlersFile)ComplexModel)IterableFault)ProtocolBase)	ByteArray)Decimal)Integer)String)DateTime)	Mandatory)AnyXml)AnyHtml)AnyDict)Unicode)AnyUri)ImageUri)Double)Integer8)Time)Date)Duration)Boolean)Uuid)Point)Line)Polygon)
MultiPoint)	MultiLine)MultiPolygonc              	   C   s
  | d u rd S t |  D ]\}}t|tr| |= || |d< t|tr(t| q|  D ]U\}}t|t tfrfg }|D ]"}t|trK|t| q<t|trY||d q<|| q<t|| |< q-t|trz	|d| |< W q- t	y   || |< Y q-w q-| S )Nutf8)
listitems
isinstancebytesdecodedict_unbytetupleappendUnicodeDecodeError)dkvlsub rC   a/var/www/html/LicenciasMiG/venv/lib/python3.10/site-packages/spyne/test/protocol/_test_dictdoc.pyr:   W   s6   




r:   c                    s*   si dt ddd df fdd	}|S )NFc              	      s   t | d ||||d |||dd}t|}	t|	tj}
j|fi }t|ts0|d}|g|
_|	j	|
dd\}|sO|	
| |sO|	| |	| |S )Ntns)ignore_wrappers
complex_aspolymorphic	validator)rF   rG   rH   )in_protocolout_protocolr3   )in_string_charset)r   r   r
   SERVERdumpsr6   r7   encode	in_stringgenerate_contextsget_in_objectget_out_objectget_out_string)servicesr>   rF   rG   just_ctxjust_in_objectrI   rH   appserverinitial_ctxrP   ctx_DictDocumentChilddumps_kwargs
serializerrC   rD   _dry_me   s.   





zTDry.<locals>._dry_me)r9   )r_   r]   r^   r`   rC   r\   rD   TDry{   s   ra   c                    sP   si si t  d u rdd G  fdddtj}|S )Nc                 S      | S NrC   )r@   rC   rC   rD   <lambda>   s    z#TDictDocumentTest.<locals>.<lambda>c                       s  e Zd ZfddZfddZfddZfddZfd	d
ZfddZfddZ	fddZ
fddZfddZfddZfddZfddZfddZfddZfdd Zfd!d"Zfd#d$Zfd%d&Zfd'd(Zfd)d*Z fd+d,Zfd-d.Zfd/d0Z fd1d2Z fd3d4Zfd5d6Zfd7d8Zfd9d:Zfd;d<Z fd=d>Z!fd?d@Z"fdAdBZ#fdCdDZ$fdEdFZ%fdGdHZ&fdIdJZ'fdKdLZ(fdMdNZ)fdOdPZ*fdQdRZ+fdSdTZ,fdUdVZ-fdWdXZ.fdYdZZ/fd[d\Z0 fd]d^Z1 fd_d`Z2 fdadbZ3fdcddZ4fdedfZ5fdgdhZ6fdidjZ7fdkdlZ8fdmdnZ9fdodpZ:fdqdrZ;fdsdtZ<fdudvZ=fdwdxZ>fdydzZ?fd{d|Z@fd}d~ZAdS )zTDictDocumentTest.<locals>.Testc                    s    t d d| j|fi  S )Nusingzto dump)printrN   selfo)r^   r_   rC   rD   rN      s   z%TDictDocumentTest.<locals>.Test.dumpsc                    sH   zt j|fi  W S  ty#   t j|fdtji  Y S w )NLoader)r:   loads	TypeErroryaml
FullLoaderrg   )loads_kwargsr_   rC   rD   rk      s
    z%TDictDocumentTest.<locals>.Test.loadsc                    sz   G dd dt  G  fdddt}|gdg i}| d|j}|d d d }|d	 d
ks3J |d dv s;J d S )Nc                   @      e Zd ZeZeZdS )zaTDictDocumentTest.<locals>.Test.test_complex_with_only_primitive_fields.<locals>.SomeComplexModelN__name__
__module____qualname__r   ir#   srC   rC   rC   rD   SomeComplexModel       rw   c                       $   e Zd Ze  d fddZdS )z\TDictDocumentTest.<locals>.Test.test_complex_with_only_primitive_fields.<locals>.SomeService_returnsc                    s    dddS )N   5xru   rv   rC   )scmrw   rC   rD   	some_call      zfTDictDocumentTest.<locals>.Test.test_complex_with_only_primitive_fields.<locals>.SomeService.some_callNrr   rs   rt   r   r   rC   r   rC   rD   SomeService       
r   r       some_callResponsesome_callResultru   r|   rv   )r}   s   5xr   r   rk   join
out_stringrh   r   r[   rv   r`   r   rD   'test_complex_with_only_primitive_fields   s   zGTDictDocumentTest.<locals>.Test.test_complex_with_only_primitive_fieldsc              	      s   G dd dt G fdddt  G  fdddt}|gddddd	d
didddiii}| d|j}t| |d d d }|d dksNJ |d dv sVJ |d d d d	ksbJ |d d d dv snJ d S )Nc                   @   rp   )z8TDictDocumentTest.<locals>.Test.test_complex.<locals>.CMNrq   rC   rC   rC   rD   CM   rx   r   c                          e Zd Z ZeZeZdS )z9TDictDocumentTest.<locals>.Test.test_complex.<locals>.CCMNrr   rs   rt   cr   ru   r#   rv   rC   r   rC   rD   CCM       r   c                       ry   )zATDictDocumentTest.<locals>.Test.test_complex.<locals>.SomeServicerz   c                    s    | j | j| jdS )Nr   ru   rv   r   )ccmr   rC   rD   r      s   zKTDictDocumentTest.<locals>.Test.test_complex.<locals>.SomeService.some_callNr   rC   r   rC   rD   r      r   r   r   r      3xr~      4xr   r   r   r   ru   rv   r   s   4xr   r   s   3xr   r   rk   r   r   rf   )rh   r   r[   retr>   r   )r   r   rD   test_complex   s"   z,TDictDocumentTest.<locals>.Test.test_complexc                    sX   G dd dt } |gdddggi}d|j}t| | |ddd	iiks*J d S )
Nc                   @   8   e Zd Zeeeddeeddddd ZdS )zGTDictDocumentTest.<locals>.Test.test_multiple_list.<locals>.SomeServiceinf
max_occursrz   c                 S   rb   rc   rC   rv   rC   rC   rD   r         zQTDictDocumentTest.<locals>.Test.test_multiple_list.<locals>.SomeService.some_callNrr   rs   rt   r   r#   decimalr   r   rC   rC   rC   rD   r      
    r   r   abr   r   r   r   r   )r   r   r   rf   rk   )rh   r   r[   datar   rC   rD   test_multiple_list   s   
z2TDictDocumentTest.<locals>.Test.test_multiple_listc                    N   G dd dt } |gddddgii}| d|jdd	d
iiks%J d S )Nc                   @   r   )zGTDictDocumentTest.<locals>.Test.test_multiple_dict.<locals>.SomeServicer   r   rz   c                 S   rb   rc   rC   r   rC   rC   rD   r      r   zQTDictDocumentTest.<locals>.Test.test_multiple_dict.<locals>.SomeService.some_callNr   rC   rC   rC   rD   r      r   r   r   rv   r   r   r   r   r   r   r   rk   r   r   rh   r   r[   r   rC   rD   test_multiple_dict   s
   
z2TDictDocumentTest.<locals>.Test.test_multiple_dictc                    r   )Nc                   @   s(   e Zd Zeeeeeddd ZdS )zMTDictDocumentTest.<locals>.Test.test_multiple_dict_array.<locals>.SomeServicerz   c                 S   rb   rc   rC   r   rC   rC   rD   r        zWTDictDocumentTest.<locals>.Test.test_multiple_dict_array.<locals>.SomeService.some_callN)rr   rs   rt   r   r   r#   r   rC   rC   rC   rD   r         r   r   rv   r   r   r   r   r   r   r   r   r   rC   rD   test_multiple_dict_array  s
   
z8TDictDocumentTest.<locals>.Test.test_multiple_dict_arrayc              
      s  G dd dt  G  fdddt }G dd d|G fdddt}|gd	d
dddddiddddigii}t|j | d|j}t| |d d sUJ |d d d s_J |d d d d d smJ |d d d d d d d dksJ |d d d d d d d dv sJ |d d d d d dksJ |d d d d d dv sJ |d d d d d dksJ d S )Nc                   @   rp   )zLTDictDocumentTest.<locals>.Test.test_multiple_dict_complex_array.<locals>.CMNrq   rC   rC   rC   rD   r     rx   r   c                       r   )zMTDictDocumentTest.<locals>.Test.test_multiple_dict_complex_array.<locals>.CCMNr   rC   r   rC   rD   r     r   r   c                   @      e Zd ZeZdS )zMTDictDocumentTest.<locals>.Test.test_multiple_dict_complex_array.<locals>.ECMN)rr   rs   rt   r   r>   rC   rC   rC   rD   ECM      r   c                       s(   e Zd Zee e ddd ZdS )zUTDictDocumentTest.<locals>.Test.test_multiple_dict_complex_array.<locals>.SomeServicerz   c                 S   rb   rc   rC   )ecmrC   rC   rD   r     r   z_TDictDocumentTest.<locals>.Test.test_multiple_dict_complex_array.<locals>.SomeService.some_callN)rr   rs   rt   r   r   r   rC   )r   rC   rD   r     r   r   r   r   r   r   r~   r   r   z2011-12-13T14:15:16Z)r   ru   rv   r>   r   r   r   r   r   ru   rv   r   r   r>   z2011-12-13T14:15:16+00:00)r   r   rf   	in_objectrk   r   r   )rh   r   r   r[   r   r   )r   r   rD    test_multiple_dict_complex_array  s.   

	((  $z@TDictDocumentTest.<locals>.Test.test_multiple_dict_complex_arrayc                    sF   G dd dt } |gddg iidd}t|j |jjdks!J d S )Nc                   @       e Zd Zeeeedd ZdS )zITDictDocumentTest.<locals>.Test.test_invalid_request.<locals>.SomeServicec                 S      t | || d S rc   rf   ru   rv   r>   rC   rC   rD   yay6     zMTDictDocumentTest.<locals>.Test.test_invalid_request.<locals>.SomeService.yayNrr   rs   rt   r   r   r   r   r   rC   rC   rC   rD   r   5      
r   r   r   T)rW   zClient.ResourceNotFound)r   rf   in_error	faultcoder   r   rC   rD   test_invalid_request4  s   
z4TDictDocumentTest.<locals>.Test.test_invalid_requestc                    >   G dd dt } |gdddiiddd}|jjd	ksJ d S )
Nc                   @   r   )zHTDictDocumentTest.<locals>.Test.test_invalid_string.<locals>.SomeServicec                 S   r   rc   r   r   rC   rC   rD   r   B  r   zLTDictDocumentTest.<locals>.Test.test_invalid_string.<locals>.SomeService.yayNr   rC   rC   rC   rD   r   A  r   r   r   rv      softTrI   rW   Client.ValidationErrorr   r   r   r   r   rC   rD   test_invalid_string@  
   z3TDictDocumentTest.<locals>.Test.test_invalid_stringc                    s>   G dd dt } |gdddgiddd}|jjd	ksJ d S )
Nc                   @   r   )zHTDictDocumentTest.<locals>.Test.test_invalid_number.<locals>.SomeServicec                 S   r   rc   r   r   rC   rC   rD   r   M  r   zLTDictDocumentTest.<locals>.Test.test_invalid_number.<locals>.SomeService.yayNr   rC   rC   rC   rD   r   L  r   r   r   rv   Br   Tr   r   r   r   r   rC   rD   test_invalid_numberK  r   z3TDictDocumentTest.<locals>.Test.test_invalid_numberc                    s\   G dd dt } |gdddgiddd}t|jj |jjd	ks#J |jjd
s,J d S )Nc                   @   "   e Zd Zeeeejdd ZdS )zGTDictDocumentTest.<locals>.Test.test_missing_value.<locals>.SomeServicec                 S   r   rc   r   r   rC   rC   rD   r   X  r   zKTDictDocumentTest.<locals>.Test.test_missing_value.<locals>.SomeService.yayN)	rr   rs   rt   r   r   r#   r   r   r   rC   rC   rC   rD   r   W      r   r   r   r   r   Tr   r   zat least 1 times.)r   rf   r   faultstringr   endswithr   r   rC   rD   test_missing_valueV  s   z2TDictDocumentTest.<locals>.Test.test_missing_valuec                    r   )
Nc                   @   r   )zJTDictDocumentTest.<locals>.Test.test_invalid_datetime.<locals>.SomeServicec                 S   r   rc   r   r   rC   rC   rD   r   e  r   zNTDictDocumentTest.<locals>.Test.test_invalid_datetime.<locals>.SomeService.yayN)	rr   rs   rt   r   r   r   r   r   r   rC   rC   rC   rD   r   d  r   r   r   r>   a2011r   Tr   r   r   r   r   rC   rD   test_invalid_datetimec  r   z5TDictDocumentTest.<locals>.Test.test_invalid_datetimec                    s$   G dd dt } |gdg i d S )Nc                   @   s   e Zd Zeeddd ZdS )zGTDictDocumentTest.<locals>.Test.test_fault_to_dict.<locals>.SomeServicerz   c                   S   s   t  rc   r   rC   rC   rC   rD   r   p     zQTDictDocumentTest.<locals>.Test.test_fault_to_dict.<locals>.SomeService.some_callN)rr   rs   rt   r   r   r   rC   rC   rC   rD   r   o  s    r   r   r   rh   r   r   rC   rD   test_fault_to_dictn  s   z2TDictDocumentTest.<locals>.Test.test_fault_to_dictc                    sf   G dd dt  G  fdddt}|gdg i}| d|j}|dddd	d iiiiks1J d S )
Nc                   @   s   e Zd ZeZeddZdS )zPTDictDocumentTest.<locals>.Test.test_prune_none_and_optional.<locals>.SomeObjectr   
min_occursN)rr   rs   rt   r   ru   r   rv   rC   rC   rC   rD   
SomeObjectw  s    r   c                       "   e Zd Ze d fddZdS )zQTDictDocumentTest.<locals>.Test.test_prune_none_and_optional.<locals>.SomeServicerz   c                      s     S rc   rC   rC   r   rC   rD   r   |  r   z[TDictDocumentTest.<locals>.Test.test_prune_none_and_optional.<locals>.SomeService.some_callNr   rC   r   rC   rD   r   {      r   r   r   r   r   rv   r   )rh   r   r[   r   r   r   rD   test_prune_none_and_optionalv  s   
z<TDictDocumentTest.<locals>.Test.test_prune_none_and_optionalc                    |   t jjtdtdddd}G dd dt} |gd|gi}| d	|j}d
d|ii}t| t| ||ks<J d S )Nz{ns1}xz{ns2}Yz	some dataunicodeencodingc                   @       e Zd Zeeeddd ZdS )zATDictDocumentTest.<locals>.Test.test_any_xml.<locals>.SomeServicerz   c                 S   ,   t |  t t|  t| tjjksJ | S rc   )rf   typelxmletree_ElementprC   rC   rD   r        zKTDictDocumentTest.<locals>.Test.test_any_xml.<locals>.SomeService.some_callN)rr   rs   rt   r   r    r   rC   rC   rC   rD   r     r   r   r   r   r   r   )	r   r   tostringr	   r   rk   r   r   rf   rh   r>   r   r[   rv   r   rC   rD   test_any_xml  s   z,TDictDocumentTest.<locals>.Test.test_any_xmlc                    r   )Ndivspan	somethingr   r   c                   @   r   )zBTDictDocumentTest.<locals>.Test.test_any_html.<locals>.SomeServicerz   c                 S   r   rc   )rf   r   r   htmlHtmlElementr   rC   rC   rD   r     r   zLTDictDocumentTest.<locals>.Test.test_any_html.<locals>.SomeService.some_callN)rr   rs   rt   r   r!   r   rC   rC   rC   rD   r     r   r   r   r   r   r   )	r   r   r   r	   r   rk   r   r   rf   r   r   rC   rD   test_any_html  s   z-TDictDocumentTest.<locals>.Test.test_any_htmlc                    s~   ddddgid}G dd dt } |gd|gi}d	|j}| d
d|ii}t| t| | || |ks=J d S )N   nested   g333333?)helor   c                   @   r   )zBTDictDocumentTest.<locals>.Test.test_any_dict.<locals>.SomeServicerz   c                 S   (   t |  t t|  t| tksJ | S rc   )rf   r   r9   r   rC   rC   rD   r        zLTDictDocumentTest.<locals>.Test.test_any_dict.<locals>.SomeService.some_callN)rr   rs   rt   r   r"   r   rC   rC   rC   rD   r     r   r   r   r   r   r   )r   r   r   rN   rf   rk   r   r   rC   rD   test_any_dict  s   z-TDictDocumentTest.<locals>.Test.test_any_dictc                    d   d}G dd dt } |gd|gi}| d|j}dd|ii}t| t| ||ks0J d S )Nsome stringc                   @   r   )zATDictDocumentTest.<locals>.Test.test_unicode.<locals>.SomeServicerz   c                 S   *   t |  t t|  t| tjksJ | S rc   )rf   r   r   	text_typer   rC   rC   rD   r        zKTDictDocumentTest.<locals>.Test.test_unicode.<locals>.SomeService.some_callNrr   rs   rt   r   r#   r   rC   rC   rC   rD   r     r   r   r   r   r   r   r   rk   r   r   rf   r   r   rC   rD   test_unicode     z,TDictDocumentTest.<locals>.Test.test_unicodec                    r   )Nz%http://example.com/?asd=b12&df=aa#tagc                   @   r   )zATDictDocumentTest.<locals>.Test.test_any_uri.<locals>.SomeServicerz   c                 S   (   t |  t t|  t| tjsJ | S rc   rf   r   r6   r   string_typesr   rC   rC   rD   r     r   zKTDictDocumentTest.<locals>.Test.test_any_uri.<locals>.SomeService.some_callN)rr   rs   rt   r   r$   r   rC   rC   rC   rD   r     r   r   r   r   r   r   r  r   r   rC   rD   test_any_uri  r  z,TDictDocumentTest.<locals>.Test.test_any_uric                    r   )Nzhttp://example.com/funny.gifc                   @   r   )zCTDictDocumentTest.<locals>.Test.test_image_uri.<locals>.SomeServicerz   c                 S   r	  rc   r
  r   rC   rC   rD   r     r   zMTDictDocumentTest.<locals>.Test.test_image_uri.<locals>.SomeService.some_callN)rr   rs   rt   r   r%   r   rC   rC   rC   rD   r     r   r   r   r   r   r   r  r   r   rC   rD   test_image_uri  r  z.TDictDocumentTest.<locals>.Test.test_image_uric                    sx   t d} jrt|}G dd dt}|gd|gi}| d|j}dd|ii}t| t| ||ks:J d S )N1e100c                   @   r   )zATDictDocumentTest.<locals>.Test.test_decimal.<locals>.SomeServicerz   c                 S   r  rc   )rf   r   r   r   r   rC   rC   rD   r     r  zKTDictDocumentTest.<locals>.Test.test_decimal.<locals>.SomeService.some_callN)rr   rs   rt   r   r   r   rC   rC   rC   rD   r     r   r   r   r   r   r   )	r   r   _decimal_as_stringstrr   rk   r   r   rf   r   r]   r`   rC   rD   test_decimal  s   
z,TDictDocumentTest.<locals>.Test.test_decimalc                    r   )Ng(@c                   @   r   )z@TDictDocumentTest.<locals>.Test.test_double.<locals>.SomeServicerz   c                 S   r   rc   )rf   r   floatr   rC   rC   rD   r     r   zJTDictDocumentTest.<locals>.Test.test_double.<locals>.SomeService.some_callN)rr   rs   rt   r   r&   r   rC   rC   rC   rD   r     r   r   r   r   r   r   r  r   r   rC   rD   test_double  r  z+TDictDocumentTest.<locals>.Test.test_doublec                    r   )Nr|   c                   @   r   )zATDictDocumentTest.<locals>.Test.test_integer.<locals>.SomeServicerz   c                 S   r   rc   )rf   r   intr   rC   rC   rD   r   )  r   zKTDictDocumentTest.<locals>.Test.test_integer.<locals>.SomeService.some_callNrr   rs   rt   r   r   r   rC   rC   rC   rD   r   (  r   r   r   r   r   r   r  r   r   rC   rD   test_integer%  r  z,TDictDocumentTest.<locals>.Test.test_integerc                    v   dd> } j rt|}G dd dt}|gd|gi}| d|j}dd|ii}t| t| ||ks9J d S )	N  c                   @   r   )zKTDictDocumentTest.<locals>.Test.test_integer_way_small.<locals>.SomeServicerz   c                 S   r   rc   rf   r   longr   rC   rC   rD   r   >  r   zUTDictDocumentTest.<locals>.Test.test_integer_way_small.<locals>.SomeService.some_callNr  rC   rC   rC   rD   r   =  r   r   r   r   r   r   _huge_numbers_as_stringr  r   rk   r   r   rf   r   r  rC   rD   test_integer_way_small8  s   z6TDictDocumentTest.<locals>.Test.test_integer_way_smallc                    r  )	Nr   r  c                   @   r   )zITDictDocumentTest.<locals>.Test.test_integer_way_big.<locals>.SomeServicerz   c                 S   r   rc   r  r   rC   rC   rD   r   T  r   zSTDictDocumentTest.<locals>.Test.test_integer_way_big.<locals>.SomeService.some_callNr  rC   rC   rC   rD   r   S  r   r   r   r   r   r   r  r   r  rC   rD   test_integer_way_bigN  s   z4TDictDocumentTest.<locals>.Test.test_integer_way_bigc                    st   t ddd  G  fdddt}|gd gi}| d|j}dd	 ii t| t  | ks8J d S )
N
         c                       $   e Zd Zeeed fddZdS )z>TDictDocumentTest.<locals>.Test.test_time.<locals>.SomeServicerz   c                    8   t |  t t|  t| tksJ |   ksJ | S rc   )rf   r   r   	isoformatr   r>   rC   rD   r   g  
   zHTDictDocumentTest.<locals>.Test.test_time.<locals>.SomeService.some_callN)rr   rs   rt   r   r(   r   rC   r'  rC   rD   r   f  r   r   r   r   r   r   )r   r&  r   rk   r   r   rf   r   r   r'  rD   	test_timec  s   	z)TDictDocumentTest.<locals>.Test.test_timec                    s   t ddd   G  fdddt}|gd gi}| d|j}dd	 ii}t| t| ||ks=J |gd
g i}| d|j}dd ii}t| t| ||ksbJ d S )N  	      c                       s:   e Zd Zeeed fddZeedfddZdS )z>TDictDocumentTest.<locals>.Test.test_date.<locals>.SomeServicerz   c                    r%  rc   )rf   r   r   r&  r   r'  rC   rD   r   |  r(  zHTDictDocumentTest.<locals>.Test.test_date.<locals>.SomeService.some_callc                      s    S rc   rC   rC   )vdtrC   rD   some_call_dt  r   zKTDictDocumentTest.<locals>.Test.test_date.<locals>.SomeService.some_call_dtN)rr   rs   rt   r   r)   r   r.  rC   r>   r-  rC   rD   r   {  s
    
r   r   r   r   r   r.  some_call_dtResponsesome_call_dtResult)r   r   r&  r   rk   r   r   rf   )rh   r   r[   rv   rdr   r/  rD   	test_datew  s   z)TDictDocumentTest.<locals>.Test.test_datec                    s~   t dddddd  G  fdddt}|gd	 gid
d}| d|j}dd ii t| t  | ks=J d S )Nr*  r+  r,        r|   c                       s*   e Zd Zeeeddd fddZdS )zBTDictDocumentTest.<locals>.Test.test_datetime.<locals>.SomeServiceF)timezonerz   c                    s@   t |  t t|  t| tksJ | jd d  ksJ | S )Ntzinfo)rf   r   r   replacer&  r   r'  rC   rD   r     s
   zLTDictDocumentTest.<locals>.Test.test_datetime.<locals>.SomeService.some_callN)rr   rs   rt   r   r   r   rC   r'  rC   rD   r     s    r   r   r   rI   r   r   r   )r   r&  r   rk   r   r   rf   r   r   r'  rD   test_datetime  s   	z-TDictDocumentTest.<locals>.Test.test_datetimec              	      s   t ddddddtjd  G  fdd	d	t}|gd
 gidd}| d|j}dd ii t| t  | ks@J d S )Nr*  r+  r,  r4  r5  r|   r7  c                	       s8   e Zd Zeeeedddejddd fddZdS )	zETDictDocumentTest.<locals>.Test.test_datetime_tz.<locals>.SomeServicer*  r   r7  )gerz   c                    r%  rc   )rf   r   r   r&  r   r'  rC   rD   r     r(  zOTDictDocumentTest.<locals>.Test.test_datetime_tz.<locals>.SomeService.some_callN)	rr   rs   rt   r   r   r   pytzutcr   rC   r'  rC   rD   r     s    r   r   r   r:  r   r   r   )	r   r=  r>  r&  r   rk   r   r   rf   r   r   r'  rD   test_datetime_tz  s   	z0TDictDocumentTest.<locals>.Test.test_datetime_tzc                    st   t  ttdd}G dd dt} |gd|gi}| d|j}dd|ii}t| t| ||ks8J d S )	Nr   -   c                   @   r   )zBTDictDocumentTest.<locals>.Test.test_duration.<locals>.SomeServicerz   c                 S   r   rc   )rf   r   r   r   rC   rC   rD   r     r   zLTDictDocumentTest.<locals>.Test.test_duration.<locals>.SomeService.some_callN)rr   rs   rt   r   r*   r   rC   rC   rC   rD   r     r   r   r   r   r   r   )	r   
to_unicoder*   r   r   rk   r   r   rf   r   r   rC   rD   test_duration  s   z-TDictDocumentTest.<locals>.Test.test_durationc                    r   )NTc                   @   r   )zATDictDocumentTest.<locals>.Test.test_boolean.<locals>.SomeServicerz   c                 S   r   rc   )rf   r   boolr   rC   rC   rD   r     r   zKTDictDocumentTest.<locals>.Test.test_boolean.<locals>.SomeService.some_callN)rr   rs   rt   r   r+   r   rC   rC   rC   rD   r     r   r   r   r   r   r   r  r   r   rC   rD   test_boolean  r  z,TDictDocumentTest.<locals>.Test.test_booleanc                    r   )Nz$7d2a6330-eb64-4900-8a10-38ebef415e9dc                   @   r   )z>TDictDocumentTest.<locals>.Test.test_uuid.<locals>.SomeServicerz   c                 S   r  rc   )rf   r   uuidUUIDr   rC   rC   rD   r     r  zHTDictDocumentTest.<locals>.Test.test_uuid.<locals>.SomeService.some_callNrr   rs   rt   r   r,   r   rC   rC   rC   rD   r     r   r   r   r   r   r   r  r   r   rC   rD   	test_uuid  r  z)TDictDocumentTest.<locals>.Test.test_uuidc                    r   )Nz
POINT(1 2)c                   @   r   )zATDictDocumentTest.<locals>.Test.test_point2d.<locals>.SomeServicerz   c                 S   r	  rc   r
  r   rC   rC   rD   r     r   zKTDictDocumentTest.<locals>.Test.test_point2d.<locals>.SomeService.some_callNrr   rs   rt   r   r-   r   rC   rC   rC   rD   r     r   r   r   r   r   r   r  r   r   rC   rD   test_point2d  r  z,TDictDocumentTest.<locals>.Test.test_point2dc                    r   )NzPOINT(1 2 3)c                   @   r   )zATDictDocumentTest.<locals>.Test.test_point3d.<locals>.SomeServicerz   c                 S   r	  rc   r
  r   rC   rC   rD   r     r   zKTDictDocumentTest.<locals>.Test.test_point3d.<locals>.SomeService.some_callNrI  rC   rC   rC   rD   r     r   r   r   r   r   r   r  r   r   rC   rD   test_point3d
  r  z,TDictDocumentTest.<locals>.Test.test_point3dc                    r   )NzLINESTRING(1 2, 3 4)c                   @   r   )z@TDictDocumentTest.<locals>.Test.test_line2d.<locals>.SomeServicerz   c                 S   r	  rc   r
  r   rC   rC   rD   r   !  r   zJTDictDocumentTest.<locals>.Test.test_line2d.<locals>.SomeService.some_callNrr   rs   rt   r   r.   r   rC   rC   rC   rD   r      r   r   r   r   r   r   r  r   r   rC   rD   test_line2d  r  z+TDictDocumentTest.<locals>.Test.test_line2dc                    r   )NzLINESTRING(1 2 3, 4 5 6)c                   @   r   )z@TDictDocumentTest.<locals>.Test.test_line3d.<locals>.SomeServicerz   c                 S   r	  rc   r
  r   rC   rC   rD   r   4  r   zJTDictDocumentTest.<locals>.Test.test_line3d.<locals>.SomeService.some_callNrL  rC   rC   rC   rD   r   3  r   r   r   r   r   r   r  r   r   rC   rD   test_line3d0  r  z+TDictDocumentTest.<locals>.Test.test_line3dc                    r   )Nz"POLYGON((1 1, 1 2, 2 2, 2 1, 1 1))c                   @   (   e Zd Zeededddd ZdS )zCTDictDocumentTest.<locals>.Test.test_polygon2d.<locals>.SomeService   rz   c                 S   r	  rc   r
  r   rC   rC   rD   r   G  r   zMTDictDocumentTest.<locals>.Test.test_polygon2d.<locals>.SomeService.some_callNrr   rs   rt   r   r/   r   rC   rC   rC   rD   r   F  r   r   r   r   r   r   r  r   r   rC   rD   test_polygon2dC  r  z.TDictDocumentTest.<locals>.Test.test_polygon2dc                    r   )Nz,POLYGON((1 1 0, 1 2 0, 2 2 0, 2 1 0, 1 1 0))c                   @   rO  )zCTDictDocumentTest.<locals>.Test.test_polygon3d.<locals>.SomeServicer   rz   c                 S   r	  rc   r
  r   rC   rC   rD   r   Z  r   zMTDictDocumentTest.<locals>.Test.test_polygon3d.<locals>.SomeService.some_callNrQ  rC   rC   rC   rD   r   Y  r   r   r   r   r   r   r  r   r   rC   rD   test_polygon3dV  r  z.TDictDocumentTest.<locals>.Test.test_polygon3dc                    r   )Nz/MULTIPOINT ((10 40), (40 30), (20 20), (30 10))c                   @   rO  )zFTDictDocumentTest.<locals>.Test.test_multipoint2d.<locals>.SomeServicerP  rz   c                 S   r	  rc   r
  r   rC   rC   rD   r   m  r   zPTDictDocumentTest.<locals>.Test.test_multipoint2d.<locals>.SomeService.some_callNrr   rs   rt   r   r0   r   rC   rC   rC   rD   r   l  r   r   r   r   r   r   r  r   r   rC   rD   test_multipoint2di  r  z1TDictDocumentTest.<locals>.Test.test_multipoint2dc                    r   )Nz MULTIPOINT (10 40 30, 40 30 10,)c                   @   rO  )zFTDictDocumentTest.<locals>.Test.test_multipoint3d.<locals>.SomeServicer   rz   c                 S   r	  rc   r
  r   rC   rC   rD   r     r   zPTDictDocumentTest.<locals>.Test.test_multipoint3d.<locals>.SomeService.some_callNrT  rC   rC   rC   rD   r     r   r   r   r   r   r   r  r   r   rC   rD   test_multipoint3d|  r  z1TDictDocumentTest.<locals>.Test.test_multipoint3dc                    r   )NEMULTILINESTRING ((10 10, 20 20, 10 40), (40 40, 30 30, 40 20, 30 10))c                   @   rO  )zETDictDocumentTest.<locals>.Test.test_multiline2d.<locals>.SomeServicerP  rz   c                 S   r	  rc   r
  r   rC   rC   rD   r     r   zOTDictDocumentTest.<locals>.Test.test_multiline2d.<locals>.SomeService.some_callNrr   rs   rt   r   r1   r   rC   rC   rC   rD   r     r   r   r   r   r   r   r  r   r   rC   rD   test_multiline2d  r  z0TDictDocumentTest.<locals>.Test.test_multiline2dc                    r   )NrW  c                   @   rO  )zETDictDocumentTest.<locals>.Test.test_multiline3d.<locals>.SomeServicer   rz   c                 S   r	  rc   r
  r   rC   rC   rD   r     r   zOTDictDocumentTest.<locals>.Test.test_multiline3d.<locals>.SomeService.some_callNrX  rC   rC   rC   rD   r     r   r   r   r   r   r   r  r   r   rC   rD   test_multiline3d  r  z0TDictDocumentTest.<locals>.Test.test_multiline3dc                    r   )NzPMULTIPOLYGON (((30 20, 10 40, 45 40, 30 20)),((15 5, 40 10, 10 20, 5 10, 15 5)))c                   @   rO  )zHTDictDocumentTest.<locals>.Test.test_multipolygon2d.<locals>.SomeServicerP  rz   c                 S   r	  rc   r
  r   rC   rC   rD   r     r   zRTDictDocumentTest.<locals>.Test.test_multipolygon2d.<locals>.SomeService.some_callNrr   rs   rt   r   r2   r   rC   rC   rC   rD   r     r   r   r   r   r   r   r  r   r   rC   rD   test_multipolygon2d  r  z3TDictDocumentTest.<locals>.Test.test_multipolygon2dc                    r   )NzvMULTIPOLYGON (((40 40, 20 45, 45 30, 40 40)),((20 35, 45 20, 30 5, 10 10, 10 30, 20 35),(30 20, 20 25, 20 15, 30 20)))c                   @   rO  )zHTDictDocumentTest.<locals>.Test.test_multipolygon3d.<locals>.SomeServicer   rz   c                 S   r	  rc   r
  r   rC   rC   rD   r     r   zRTDictDocumentTest.<locals>.Test.test_multipolygon3d.<locals>.SomeService.some_callNr[  rC   rC   rC   rD   r     r   r   r   r   r   r   r  r   r   rC   rD   test_multipolygon3d  s   z3TDictDocumentTest.<locals>.Test.test_multipolygon3dc                    sf   G dd dt } |gdg i}| d|j}ddttdii}t| t| ||ks1J d S )Nc                   @   s"   e Zd Zeeeddd ZdS )zCTDictDocumentTest.<locals>.Test.test_generator.<locals>.SomeServicerz   c                   S   s   t tdS )Nr  )iterrangerC   rC   rC   rD   r     r   zMTDictDocumentTest.<locals>.Test.test_generator.<locals>.SomeService.some_callN)rr   rs   rt   r   r   r   r   rC   rC   rC   rD   r     r   r   r   r   r   r   r  )r   rk   r   r   r;   r_  rf   rh   r   r[   rv   r>   r   rC   rD   test_generator  s   z.TDictDocumentTest.<locals>.Test.test_generatorc                    s   j }t| }tttd | g}jr|d}G  fdddt}|gd|gi}| d	|j
}dd|ii}tt| tt| tt| ||ksVJ d S )	N   latin1c                       r$  )zCTDictDocumentTest.<locals>.Test.test_bytearray.<locals>.SomeServicerz   c                    s4   t |  t t|  t| tsJ |  fksJ | S rc   )rf   r   r6   r;   )bar   rC   rD   r     s
   zMTDictDocumentTest.<locals>.Test.test_bytearray.<locals>.SomeService.some_callNrr   rs   rt   r   r   r   rC   re  rC   rD   r     r   r   r   r   r   r   default_binary_encodingr   r7   	bytearrayr_  
text_basedr8   r   rk   r   r   rf   reprrh   dbebehencoded_datar   r[   rv   r>   r  re  rD   test_bytearray  s   

	z.TDictDocumentTest.<locals>.Test.test_bytearrayc                    s   j }t| }tttd | g}jr|d}G  fdddt}|gd|gi}| d	|j
}dd|ii}t| t| tt| ||ksRJ d S )	Nrb  rc  c                       r$  )zCTDictDocumentTest.<locals>.Test.test_file_data.<locals>.SomeServicerz   c                    s:   t |  t t|  t| tjsJ | j fksJ | jS rc   )rf   r   r6   r   Valuer   r   re  rC   rD   r     s
   zMTDictDocumentTest.<locals>.Test.test_file_data.<locals>.SomeService.some_callNrr   rs   rt   r   r   r   rC   re  rC   rD   r     r   r   r   r   r   r   rg  rl  r  re  rD   test_file_data  s   


z.TDictDocumentTest.<locals>.Test.test_file_datac                    s  j }t| }tjdddtttd  f_| g jr+|j	d}n|j}t
tj G  fdddt}ttdd	}|gd
d|ii}d|j}| ddjj|dii}t
| | t
| | t
 | || |ksJ d S )Nzsome_file.binzapplication/octet-stream)namer   rb  rc  c                       s&   e Zd Zeeed fddZdS )zDTDictDocumentTest.<locals>.Test.test_file_value.<locals>.SomeServicerz   c                    sX   t |  t t|  t| tjsJ | j fksJ | jjks"J | jjks*J | S rc   )rf   r   r6   r   rq  r   rt  r   	file_datar@   rC   rD   r   :  s   zNTDictDocumentTest.<locals>.Test.test_file_value.<locals>.SomeService.some_callNrr  rC   ru  rC   rD   r   9  s    
r   F)protocolrF   r   r   r   r   r   )rt  r   r   )rh  r   r   rq  r7   ri  r_  r   rj  r8   rf   rk  r   r   r   r   rN   rt  r   rk   )rh   rm  rn  	test_datar   r>   r[   rv   r  ru  rD   test_file_value&  s8   

z/TDictDocumentTest.<locals>.Test.test_file_valuec                    sL   G dd dt } |gddgi}| d|j}di i}||ks$J d S )Nc                   @   r   )zATDictDocumentTest.<locals>.Test.test_ignored.<locals>.SomeServicerz   c                 S   s2   t |  t t|  t| tjsJ tddddS )Naaar   rP  )r   r   )rf   r   r6   r   r  r   r   rC   rC   rD   r   U  s   zKTDictDocumentTest.<locals>.Test.test_ignored.<locals>.SomeService.some_callNr  rC   rC   rC   rD   r   T  r   r   r   r  r   r   r   r`  r   rC   rD   test_ignoredS  s
   z,TDictDocumentTest.<locals>.Test.test_ignoredc                    sD   G dd dt }z |gdg idd W td ty!   Y d S w )Nc                   @   &   e Zd Zeeddeddd ZdS )zNTDictDocumentTest.<locals>.Test.test_validation_frequency.<locals>.SomeServicer   r   rz   c                 S      d S rc   rC   r   rC   rC   rD   r   d  r   zXTDictDocumentTest.<locals>.Test.test_validation_frequency.<locals>.SomeService.some_callNrf  rC   rC   rC   rD   r   c      r   r   r   r:  must raise ValidationErrorr   r   	Exceptionr   r   rC   rD   test_validation_frequencyb  s   z9TDictDocumentTest.<locals>.Test.test_validation_frequencyc                    sF   G dd dt }z |gdd gidd W td ty"   Y d S w )Nc                   @   r|  )zMTDictDocumentTest.<locals>.Test.test_validation_nullable.<locals>.SomeServiceF)nullablerz   c                 S   r}  rc   rC   r   rC   rC   rD   r   q  r   zWTDictDocumentTest.<locals>.Test.test_validation_nullable.<locals>.SomeService.some_callNrf  rC   rC   rC   rD   r   p  r~  r   r   r   r:  r  r  r   r   rC   rD   test_validation_nullableo     z8TDictDocumentTest.<locals>.Test.test_validation_nullablec              
      s`   G dd dt }z |gddgidd W td ty/ } zt| W Y d }~d S d }~ww )Nc                   @      e Zd Zeedd ZdS )zSTDictDocumentTest.<locals>.Test.test_validation_string_pattern.<locals>.SomeServicec                 S   r}  rc   rC   r   rC   rC   rD   r     r   z]TDictDocumentTest.<locals>.Test.test_validation_string_pattern.<locals>.SomeService.some_callNrG  rC   rC   rC   rD   r         r   r   dudukr   r:  r  )r   r   rf   r  rh   r   er   rC   rD   test_validation_string_pattern~  s   z>TDictDocumentTest.<locals>.Test.test_validation_string_patternc                    F   G dd dt }z |gddgidd W td ty"   Y d S w )Nc                   @   s$   e Zd Zeeddddd ZdS )zRTDictDocumentTest.<locals>.Test.test_validation_integer_range.<locals>.SomeServicer   r|   )r<  lec                 S   r}  rc   rC   r   rC   rC   rD   r     r   z\TDictDocumentTest.<locals>.Test.test_validation_integer_range.<locals>.SomeService.some_callNr  rC   rC   rC   rD   r     s    r   r   r!  r   r:  r  r  r   r   rC   rD   test_validation_integer_range  r  z=TDictDocumentTest.<locals>.Test.test_validation_integer_rangec                    r  )Nc                   @   r  )zQTDictDocumentTest.<locals>.Test.test_validation_integer_type.<locals>.SomeServicec                 S   r}  rc   rC   r   rC   rC   rD   r     r   z[TDictDocumentTest.<locals>.Test.test_validation_integer_type.<locals>.SomeService.some_callNrr   rs   rt   r   r'   r   rC   rC   rC   rD   r     r  r   r   ir   r:  r  r  r   r   rC   rD   test_validation_integer_type  r  z<TDictDocumentTest.<locals>.Test.test_validation_integer_typec                    r  )Nc                   @   r  )zSTDictDocumentTest.<locals>.Test.test_validation_integer_type_2.<locals>.SomeServicec                 S   r}  rc   rC   r   rC   rC   rD   r     r   z]TDictDocumentTest.<locals>.Test.test_validation_integer_type_2.<locals>.SomeService.some_callNr  rC   rC   rC   rD   r     r  r   r   g333333?r   r:  r  r  r   r   rC   rD   test_validation_integer_type_2  s   z>TDictDocumentTest.<locals>.Test.test_validation_integer_type_2c                    s   G dd dt G fdddt  G  fdddt}ddd	d
id}d|gi}|g|dd}t|j dd|ii}| |jd | d S )Nc                   @   rp   )zHTDictDocumentTest.<locals>.Test.test_not_wrapped.<locals>.SomeInnerClassN)rr   rs   rt   r   r>   r   dtrC   rC   rC   rD   SomeInnerClass  rx   r  c                       s    e Zd ZeZeZ jddZdS )zCTDictDocumentTest.<locals>.Test.test_not_wrapped.<locals>.SomeClassTnot_wrappedN)	rr   rs   rt   r  r   r#   r   	customizer   rC   )r  rC   rD   	SomeClass  s    r  c                       s0   e Zd Ze jdd jddddd ZdS )zETDictDocumentTest.<locals>.Test.test_not_wrapped.<locals>.SomeServiceTr  rz   c                 S   s8   | j dksJ | jdksJ | jjtdddksJ | S )Nr   rv   i        )r   r   r   r>   r   r   rC   rC   rD   r     s   zOTDictDocumentTest.<locals>.Test.test_not_wrapped.<locals>.SomeService.some_callN)rr   rs   rt   r   r  r   rC   )r  rC   rD   r     s
    
r   r   rv   r>   z
2018-11-22)r   r   r   r   r   r:  r   r   r   )r   r   rf   out_documentassertEquals)rh   r   innerdocr[   r>   r`   convert_dict)r  r  rD   test_not_wrapped  s   	

z0TDictDocumentTest.<locals>.Test.test_not_wrappedc              
      s   G dd dt  G  fdddt}z|gdddddiiiid	d
 W td ty> } zt| W Y d }~nd }~w tyT } zt| W Y d }~nd }~ww |gdi id	d
 d S )Nc                   @   s   e Zd ZeddZeZdS )zFTDictDocumentTest.<locals>.Test.test_validation_freq_parent.<locals>.Cr   r   Nrq   rC   rC   rC   rD   C      
r  c                          e Zd Ze dd ZdS )zPTDictDocumentTest.<locals>.Test.test_validation_freq_parent.<locals>.SomeServicec                 S   r}  rc   rC   r   rC   rC   rD   r     r   zZTDictDocumentTest.<locals>.Test.test_validation_freq_parent.<locals>.SomeService.some_callNr   rC   r  rC   rD   r     r  r   r   r   rv   r   r   r:  r  )r   r   r   logger	exceptionBaseExceptionr  r  r   r  rD   test_validation_freq_parent  s"   	

z;TDictDocumentTest.<locals>.Test.test_validation_freq_parentc                    s   G dd dt }G dd d| G  fdddt}|gdg i}| d|j}d	d
ddddddiii}||ks>J d S )Nc                   @   rp   )z;TDictDocumentTest.<locals>.Test.test_inheritance.<locals>.PN)rr   rs   rt   r,   
identifierr#   	signaturerC   rC   rC   rD   P  rx   r  c                   @   rp   )z;TDictDocumentTest.<locals>.Test.test_inheritance.<locals>.CN)rr   rs   rt   r#   foor,   barrC   rC   rC   rD   r    rx   r  c                       r   )zETDictDocumentTest.<locals>.Test.test_inheritance.<locals>.SomeServicerz   c                    s2     }t jdd|_d|_d|_t jdd|_|S )Nr   )r  yyyyyyyyyyyzzzzzzr   )rE  rF  r  r  r  r  )r[   resultr  rC   rD   r     s   zOTDictDocumentTest.<locals>.Test.test_inheritance.<locals>.SomeService.some_callN)rr   rs   rt   r   r   rC   r  rC   rD   r     r   r   r   r   r   r   z$00000000-0000-0000-0000-000000000000z$00000000-0000-0000-0000-000000000001r  r  )r  r  r  r  r   )rh   r  r   r[   rv   r>   r   r  rD   test_inheritance  s   
z0TDictDocumentTest.<locals>.Test.test_inheritancec              	      sn   G dd dt  G  fdddt}ddddig}|gd|i}| |jd	 d
ddddiiii d S )Nc                   @   s   e Zd ZeddZeZdS )z7TDictDocumentTest.<locals>.Test.test_exclude.<locals>.CT)excN)rr   rs   rt   r#   s1s2rC   rC   rC   rD   r    r  r  c                       ry   )zATDictDocumentTest.<locals>.Test.test_exclude.<locals>.SomeServicerz   c                    s2   | j d u sJ d| | jdksJ  dddS )Nzsc={}r  r  r  r  )r  formatr  )scr  rC   rD   r     s   zKTDictDocumentTest.<locals>.Test.test_exclude.<locals>.SomeService.some_callNr   rC   r  rC   rD   r     r   r   r  r  r  r   r   r   r   )r   r   r  r  )rh   r   r  r[   r  r  rD   test_exclude  s   
z,TDictDocumentTest.<locals>.Test.test_excludec                    s   G dd dt  G dd d }G dd d }G  fdddt}|gd	dd
ddigidd}| d|j}dddii}t| t| ||ksOJ |gd	ddddigidd}| d|j}dddii}t| t| ||ks|J d S )Nc                   @   r   )zKTDictDocumentTest.<locals>.Test.test_polymorphic_deserialization.<locals>.PN)rr   rs   rt   r#   sigrC   rC   rC   rD   r  $  r   r  c                   @   r   )zKTDictDocumentTest.<locals>.Test.test_polymorphic_deserialization.<locals>.CN)rr   rs   rt   r#   r  rC   rC   rC   rD   r  '  r   r  c                   @   r   )zKTDictDocumentTest.<locals>.Test.test_polymorphic_deserialization.<locals>.DN)rr   rs   rt   r   r  rC   rC   rC   rD   D*  r   r  c                       s    e Zd Ze eddd ZdS )zUTDictDocumentTest.<locals>.Test.test_polymorphic_deserialization.<locals>.SomeServicerz   c                 S   s
   t |jS rc   )r   rr   )r[   r   rC   rC   rD   typeof.  s   
z\TDictDocumentTest.<locals>.Test.test_polymorphic_deserialization.<locals>.SomeService.typeofN)rr   rs   rt   r   r#   r  rC   r  rC   rD   r   -  r   r   r  r   f)r  r  TrH   r   typeofResponsetypeofResultr   r|   )r  r  r   )rh   r  r  r   r[   rv   r>   r   r  rD    test_polymorphic_deserialization#  s,   z@TDictDocumentTest.<locals>.Test.test_polymorphic_deserializationc                    s   G dd dt  G  fdddt}|gdddd digid	d
}|jjjd ks+J |jd u s2J |gddddiiid	d
}|jjjdksIJ |jd u sPJ d S )Nc                   @   s"   e Zd ZdefdeddfgZdS )zFTDictDocumentTest.<locals>.Test.test_default.<locals>.SomeComplexModelr   r   default)r  Nrr   rs   rt   r#   
_type_inforC   rC   rC   rD   rw   I  s    rw   c                       r  )zATDictDocumentTest.<locals>.Test.test_default.<locals>.SomeServicec                 S   r}  rc   rC   r   rC   rC   rD   some_methodP  r   zMTDictDocumentTest.<locals>.Test.test_default.<locals>.SomeService.some_methodNrr   rs   rt   r   r  rC   r   rC   rD   r   O  r  r   r  rv   xr   Tr  r   r  r   r   r   rv   r   r   r   r   r   rD   test_defaultH  s   z,TDictDocumentTest.<locals>.Test.test_defaultc                    s   G dd dt  G  fdddt}|gdddd digid	d
d}|jjjd ks,J |jd u s3J |gddddiiid	d}|jjjdksJJ |jd u sQJ d S )Nc                   @   s&   e Zd ZdefdeddddfgZdS )zOTDictDocumentTest.<locals>.Test.test_nillable_default.<locals>.SomeComplexModelr   r   r   r  T)r   r  nillableNr  rC   rC   rC   rD   rw   b  s    rw   c                       r  )zJTDictDocumentTest.<locals>.Test.test_nillable_default.<locals>.SomeServicec                 S   r}  rc   rC   r   rC   rC   rD   r  i  r   zVTDictDocumentTest.<locals>.Test.test_nillable_default.<locals>.SomeService.some_methodNr  rC   r   rC   rD   r   h  r  r   r  rv   r  r   Tr   )rH   rI   r   r  r  r  r   r   r   rD   test_nillable_defaulta  s   z5TDictDocumentTest.<locals>.Test.test_nillable_defaultN)Brr   rs   rt   rN   rk   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r  r  r  r   r)  r3  r;  r?  rB  rD  rH  rJ  rK  rM  rN  rR  rS  rU  rV  rY  rZ  r\  r]  ra  rp  rs  ry  r{  r  r  r  r  r  r  r  r  r  r  r  r  r  rC   r]   r`   r  r^   ro   r_   rC   rD   Test   s     (-%r  )ra   unittestTestCase)r_   r]   r^   ro   r  r  rC   r  rD   TDictDocumentTest   s$             Zr  rc   )NNN)P
__future__r   loggingrm   	getLoggerrr   r  r  rE  r=  r   
spyne.utilr   spyne.util.dictdocr   PY2r  r  r   r   r   r   
lxml.etreer   	lxml.htmllxml.builderr	   spyner
   r   spyne.servicer   spyne.serverr   spyne.applicationr   spyne.decoratorr   r   spyne.errorr   spyne.model.binaryr   r   spyne.model.complexr   r   spyne.model.faultr   spyne.protocolr   r   spyne.model.primitiver   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r:   ra   r  rC   rC   rC   rD   <module>   sx   

$#