%PDF- %PDF-
Direktori : /snap/core22/2010/usr/share/subiquity/subiquitycore/tests/__pycache__/ |
Current File : //snap/core22/2010/usr/share/subiquity/subiquitycore/tests/__pycache__/test_pubsub.cpython-310.pyc |
o K��^� � @ sD d dl mZ d dlmZ d dlmZ d dlmZ G dd� de�ZdS )� �� MagicMock)�SubiTestCase)� MessageHub)�run_coroc @ s, e Zd Zdd� Zdd� Zdd� Zdd� Zd S ) �TestMessageHubc C s t � | _d S )N)r �hub)�self� r �7/usr/share/subiquity/subiquitycore/tests/test_pubsub.py�setUp s zTestMessageHub.setUpc C sL t � }d}d}t|�D ] }| j�||� qt| j�|�� | �||j� d S )N� i� )r �ranger � subscriber � abroadcast�assertEqual� call_count)r �cb�expected_calls� channel_id�_r r r �test_multicall s zTestMessageHub.test_multicallc C sT dd� t d�D �}d}|D ] }| j�||� q t| j�|�� |D ]}|�� q!d S )Nc S s g | ]}t � �qS r r )�.0r r r r � <listcomp>$ s z7TestMessageHub.test_multisubscriber.<locals>.<listcomp>� i) )r r r r r �assert_called_once_with)r �cbsr r r r r �test_multisubscriber# s �z#TestMessageHub.test_multisubscriberc C sP t � }d}| j�||� t| jj|ddddgdd�� |jddddgdd� d S )Nztest-message-arg�0� �twor r )�four)r r r r r r )r r r r r r �test_message_arg, s zTestMessageHub.test_message_argN)�__name__� __module__�__qualname__r r r r"