o
    i                     @   s   d dl Z d dlmZmZmZ d dlmZmZmZm	Z	m
Z
mZmZmZ d dlmZ d dlmZ G dd de jZedkrAe   dS dS )	    N)ApplicationServicerpc)ArrayComplexModelAnyXmlUnsignedLongUnsignedInteger16IntegerDateTimeUnicode)HttpRpc)Soap11c                   @   s   e Zd Zdd Zdd ZdS )TestInterfacec                    s  dd l }|j|jd G dd dtG dd dtG fdddtG d	d
 d
 G fdddt}G  fdddt}t||gt t ddd}|jj	}|j
 }|jj}t| || tg dksmJ |d tdgksxJ |d tdgksJ |d|  sJ |d|  d j|ksJ |d|  d j|jksJ |d|  sJ |d|  d j|ksJ |d|  d j|jksJ d S )Nr   )levelc                   @   s   e Zd ZdZeZeZdS )z0TestInterface.test_imports.<locals>.KeyValuePair1N)__name__
__module____qualname____namespace__r   keyvalue r   r   c/var/www/html/LicenciasMIG/venv/lib/python3.10/site-packages/spyne/test/interface/test_interface.pyKeyValuePair#       r   c                   @   s   e Zd ZdZeZeZdS )z-TestInterface.test_imports.<locals>.Something2N)r   r   r   r   r   dr
   ir   r   r   r   	Something(   r   r   c                       s   e Zd ZdZeZeZ ZdS )z1TestInterface.test_imports.<locals>.SomethingElse3N)	r   r   r   r   r   ar   bsr   )r   r   r   SomethingElse-   s
    r$   c                   @   s   e Zd ZdZeZdS )z3TestInterface.test_imports.<locals>.BetterSomething4N)r   r   r   r   r	   kr   r   r   r   BetterSomething3   s    r'   c                       s$   e Zd Zee ddd ZdS )z,TestInterface.test_imports.<locals>.Service1_returnsc                 S      d S Nr   ctxsthr   r   r   	some_call8      z6TestInterface.test_imports.<locals>.Service1.some_callN)r   r   r   r   r   r/   r   )r   r$   r   r   Service17       r1   c                       s$   e Zd Ze eddd ZdS )z,TestInterface.test_imports.<locals>.Service2r(   c                 S   r*   r+   r   r,   r   r   r   some_other_call=   r0   z<TestInterface.test_imports.<locals>.Service2.some_other_callN)r   r   r   r   r   r3   r   )r'   r   r   r   Service2<   r2   r4   r   target_namespace)in_protocolout_protocolnametns)r   r    r%   r    r   r%   z{%s}some_callz{%s}some_other_call)loggingbasicConfigDEBUGr   r   r   r   r   	interfaceimportsget_tnsservice_method_mapprintsetservice_classfunctionr/   r3   )selfr:   r1   r4   applicationr>   r9   smmr   )r'   r   r   r$   r   test_imports   s4   
 zTestInterface.test_importsc                    sV   t ddgddG fdddt G  fdddt}t|gd	td
dt d d S )Nnew	processedbonta)valueszontac                       s   e Zd Ze ZdS )zATestInterface.test_custom_primitive_in_array.<locals>.DataRequestN)r   r   r   r   statusr   )RequestStatusr   r   DataRequest[   s    rP   c                       s   e Zd Ze dd ZdS )zGTestInterface.test_custom_primitive_in_array.<locals>.HelloWorldServicec                 S   r*   r+   r   )r-   dgrntclr   r   r   r/   _   r0   zQTestInterface.test_custom_primitive_in_array.<locals>.HelloWorldService.some_callN)r   r   r   r   r/   r   )rP   r   r   HelloWorldService^   s    rR   zspyne.examples.hello.soaplxml)	validator)r6   r7   )r   r   r   r   r   )rE   rR   r   )rP   rO   r   test_custom_primitive_in_arrayX   s   
z,TestInterface.test_custom_primitive_in_arrayN)r   r   r   rH   rU   r   r   r   r   r      s    9r   __main__)unittestspyner   r   r   spyne.modelr   r   r   r   r	   r
   r   r   spyne.protocol.httpr   spyne.protocol.soapr   TestCaser   r   mainr   r   r   r   <module>   s   (L