o
    •ºé`M  ã                   @   sœ   d dl Z d dl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 ejj ejje dd�gZe ¡ dd	„ ƒZd
d„ Zedddd�Zdd„ Zdd„ ZdS )é    N)ÚDBusAddressÚnew_method_call)Úmessage_bus)Úconnect_and_authenticateÚProxy)Úhave_session_buszTests require DBus session bus)Úreasonc                  C  s(   �t dd�I d H \} }|V  |  ¡  d S )NÚSESSION)Úbus)r   Úclose)Ú	transportÚproto© r   úF/usr/lib/python3/dist-packages/jeepney/integrate/tests/test_asyncio.pyÚsession_proto   s   €r   c                 Ã   s   �| j  d¡s	J ‚d S )Nú:)Úunique_nameÚ
startswith)r   r   r   r   Útest_connect_old   s   €r   zorg.freedesktop.DBusz/org/freedesktop/DBuszorg.freedesktop.DBus.Peer)Úbus_nameÚobject_pathÚ	interfacec                 Ã   s6   �t tdƒ}tj|  |¡dd�I d H }|dksJ ‚d S )NÚPingé   )Útimeoutr   )r   Úbus_peerÚasyncioÚwait_forÚsend_message)r   Ú	ping_callÚ
reply_bodyr   r   r   Útest_send_and_get_reply_old"   s   €

ÿr!   c                 Ã   sN   �t t| ƒ}d}| |¡I d H }|dv sJ ‚| |¡I d H \}|du s%J ‚d S )Nz+io.gitlab.takluyver.jeepney.examples.Server>   ©é   ©é   T)r   r   ÚRequestNameÚNameHasOwner)r   ÚproxyÚnameÚresÚ	has_ownerr   r   r   Útest_proxy_old)   s   €
r,   )r   ÚpytestÚjeepneyr   r   Újeepney.bus_messagesr   Újeepney.integrate.asyncior   r   Újeepney.io.tests.utilsr   ÚmarkÚskipifÚ
pytestmarkÚfixturer   r   r   r!   r,   r   r   r   r   Ú<module>   s*    ÿþ
ý