U
    [e                     @   sf   d dl mZmZmZ d dlmZmZ edddZedZ	dd Z
d	d
 Zdd Zdd Zdd ZdS )    )DBusAddress
new_signalnew_method_call)	MatchRulemessage_busz/org/freedesktop/portal/desktopzorg.freedesktop.portal.Desktop)Zobject_pathZbus_nameorg.freedesktop.portal.Requestc                  C   sR   t ddd} | ttds t| ttdr4t| ttddrNtd S )Nsignalr   )typeZ	interfaceResponseBooz"org.freedesktop.portal.FileChooser)r   matchesr   portal_req_ifaceAssertionErrorr   portalwith_interfacerule r   a/var/www/html/services/stratfitenv/lib/python3.8/site-packages/jeepney/tests/test_bus_messages.pytest_match_rule_simple   s      r   c                   C   s8   t ddttdstt ddttdr4td S )Nz/org/freedesktop/portal)Zpath_namespacer
   z/org/freedesktop/por)r   r   r   r   r   r   r   r   r   test_match_rule_path_namespace   s    

r   c                  C   sb   t dd} | dd | ttdddds0t| ttddd	drJt| ttdr^td S )
Nmethod_callr	   r   foor   s)r   	signaturebody)Zfoobarr   add_arg_conditionr   r   r   r   r   r   r   r   test_match_rule_arg%   s    
      r    c                  C   s   t dd} | jdddd | ttddd	d
s4t| ttdddd
sNt| ttdddd
sht| ttdddd
rt| ttdddd
rt| ttdddd
rtd S )Nr   r   r   /aa/bb/pathkindr   r   )r!   r   )z	/aa/bb/cc)z/aa/)z/aa)z/aa/bbu)   r   r   r   r   r   test_match_rule_arg_path5   sL    
                  r'   c                  C   s~   t dd} | jdddd | ttddds2t| ttddd	sJt| ttddd
rbt| ttdddrztd S )NZNameOwnerChanged)memberr   com.example.backend1	namespacer#   r   )r)   )zcom.example.backend1.foo.bar)zcom.example.backend12r%   )   )r   r   r   r   r   r   r   r   r   r   test_match_rule_arg_namespaceW   s4    
   
   
   
   r,   N)Zjeepneyr   r   r   Zjeepney.bus_messagesr   r   r   r   r   r   r   r    r'   r,   r   r   r   r   <module>   s   
"