File: //lib/python3.6/site-packages/zope/component/tests/__pycache__/test_registry.cpython-36.pyc
3
,�W/ � @ sp d Z ddlZG dd� dej�ZG dd� dej�ZG dd� dej�ZG d d
� d
ej�ZG dd� de�Zd
d� Z dS )zTests for z.c.registry
� Nc @ s, e Zd ZddlmZmZ dd� Zdd� ZdS )�%Test_dispatchUtilityRegistrationEventr )�setUp�tearDownc O s ddl m} |||�S )Nr )� dispatchUtilityRegistrationEvent)�zope.component.registryr )�self�args�kwr � r
�#/usr/lib/python3.6/test_registry.py�_callFUT s z.Test_dispatchUtilityRegistrationEvent._callFUTc sp ddl m} G dd� dt�}t� }g � � fdd�}t||d�� | j|� |� W d Q R X | j� |j|fg� d S )Nr )�registryc @ s e Zd Ze� ZdS )zDTest_dispatchUtilityRegistrationEvent.test_it.<locals>._RegistrationN)�__name__�
__module__�__qualname__�object� componentr
r
r
r �
_Registration s r c s � j | � d S )N)�append)r )�_handledr
r �_handle! s z>Test_dispatchUtilityRegistrationEvent.test_it.<locals>._handle)�handle)�zope.componentr
r �_Monkeyr �assertEqualr )r r
r �_EVENTr r
)r r �test_it s z-Test_dispatchUtilityRegistrationEvent.test_itN)r r r �zope.component.testingr r r r r
r
r
r r s r c @ s, e Zd ZddlmZmZ dd� Zdd� ZdS )�%Test_dispatchAdapterRegistrationEventr )r r c O s ddl m} |||�S )Nr )� dispatchAdapterRegistrationEvent)r r )r r r r r
r
r r , s z.Test_dispatchAdapterRegistrationEvent._callFUTc st ddl m} G dd� dt�}|� }t� }g � � fdd�}t||d�� | j||� W d Q R X | j� |j|fg� d S )Nr )r
c @ s e Zd Zdd� ZdS )zDTest_dispatchAdapterRegistrationEvent.test_it.<locals>._Registrationc _ s d S )Nr
)r r r r
r
r �factory3 s zLTest_dispatchAdapterRegistrationEvent.test_it.<locals>._Registration.factoryN)r r r r r
r
r
r r 2 s r c s � j | � d S )N)r )r )r r
r r 8 s z>Test_dispatchAdapterRegistrationEvent.test_it.<locals>._handle)r )r r
r r r r r )r r
r �
_registrationr r r
)r r r 0 s z-Test_dispatchAdapterRegistrationEvent.test_itN)r r r r r r r r r
r
r
r r ( s r c @ s, e Zd ZddlmZmZ dd� Zdd� ZdS )�1Test_dispatchSubscriptionAdapterRegistrationEventr )r r c O s ddl m} |||�S )Nr )�,dispatchSubscriptionAdapterRegistrationEvent)r r# )r r r r# r
r
r r C s z:Test_dispatchSubscriptionAdapterRegistrationEvent._callFUTc st ddl m} G dd� dt�}|� }t� }g � � fdd�}t||d�� | j||� W d Q R X | j� |j|fg� d S )Nr )r
c @ s e Zd Zdd� ZdS )zPTest_dispatchSubscriptionAdapterRegistrationEvent.test_it.<locals>._Registrationc _ s d S )Nr
)r r r r
r
r r K s zXTest_dispatchSubscriptionAdapterRegistrationEvent.test_it.<locals>._Registration.factoryN)r r r r r
r
r
r r J s r c s � j | � d S )N)r )r )r r
r r P s zJTest_dispatchSubscriptionAdapterRegistrationEvent.test_it.<locals>._handle)r )r r
r r r r r )r r
r r! r r r
)r r r H s z9Test_dispatchSubscriptionAdapterRegistrationEvent.test_itN)r r r r r r r r r
r
r
r r"