| Current Path : /lib/python3/dist-packages/certbot/plugins/__pycache__/ |
| Current File : //lib/python3/dist-packages/certbot/plugins/__pycache__/dns_test_common.cpython-38.pyc |
U
�]� � @ s� d Z ddlZddlZddlZddlZddlmZ ddlm Z ddl
mZ ddlm
Z
ddlmZ dZej�e�d ��ZG d
d� de�Zdd
� ZdS )z'Base test class for DNS authenticators.� N)�
challenges)�achallenges)�
filesystem)� acme_util)�utilzexample.comzrsa512_key.pemc @ s: e Zd ZdZejejee d�Z
dd� Zdd� Zdd� Z
d S )
�BaseAuthenticatorTestz�
A base test class to reduce duplication between test code for DNS Authenticator Plugins.
Assumes:
* That subclasses also subclass unittest.TestCase
* That the authenticator is stored as self.auth
)ZchallbZdomainZaccount_keyc C s | � t| j�� tj�� d S �N)Z
assertTrue�
isinstance�authZ more_info�sixZstring_types��self� r �A/usr/lib/python3/dist-packages/certbot/plugins/dns_test_common.py�test_more_info s z$BaseAuthenticatorTest.test_more_infoc C s | � | j�d �tjg� d S r )ZassertEqualr
Zget_chall_prefr �DNS01r r r r �test_get_chall_pref# s z)BaseAuthenticatorTest.test_get_chall_prefc C s. t �� }| j�|� |jdtt jt jd� d S )Nzpropagation-seconds)�type�default�help)�mockZ MagicMockr
Zadd_parser_argumentsZassert_any_call�int�ANY)r
�mr r r �test_parser_arguments'