Hello community,
here is the log from the commit of package python-certbot-dns-dnsmadeeasy for
openSUSE:Factory checked in at 2020-01-03 17:39:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-certbot-dns-dnsmadeeasy (Old)
and /work/SRC/openSUSE:Factory/.python-certbot-dns-dnsmadeeasy.new.6675
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-certbot-dns-dnsmadeeasy"
Fri Jan 3 17:39:07 2020 rev:15 rq:760654 version:1.0.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-certbot-dns-dnsmadeeasy/python-certbot-dns-dnsmadeeasy.changes
2019-11-15 00:25:11.615848091 +0100
+++
/work/SRC/openSUSE:Factory/.python-certbot-dns-dnsmadeeasy.new.6675/python-certbot-dns-dnsmadeeasy.changes
2020-01-03 17:39:25.443370808 +0100
@@ -1,0 +2,6 @@
+Fri Jan 3 12:33:56 UTC 2020 - Marketa Calabkova <[email protected]>
+
+- update to version 1.0.0
+ * Sync with main certbot package.
+
+-------------------------------------------------------------------
Old:
----
certbot-dns-dnsmadeeasy-0.40.1.tar.gz
New:
----
certbot-dns-dnsmadeeasy-1.0.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-certbot-dns-dnsmadeeasy.spec ++++++
--- /var/tmp/diff_new_pack.osYBNa/_old 2020-01-03 17:39:26.151371171 +0100
+++ /var/tmp/diff_new_pack.osYBNa/_new 2020-01-03 17:39:26.159371175 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-certbot-dns-dnsmadeeasy
#
-# Copyright (c) 2019 SUSE LLC.
+# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,20 +18,21 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-certbot-dns-dnsmadeeasy
-Version: 0.40.1
+Version: 1.0.0
Release: 0
Summary: DNS Made Easy Authenticator plugin for Certbot
License: Apache-2.0
URL: https://github.com/certbot/certbot
Source:
https://files.pythonhosted.org/packages/source/c/certbot-dns-dnsmadeeasy/certbot-dns-dnsmadeeasy-%{version}.tar.gz
-BuildRequires: %{python_module certbot >= 0.34.0}
-BuildRequires: %{python_module dns-lexicon}
+BuildRequires: %{python_module certbot >= 1.0.0}
+BuildRequires: %{python_module dns-lexicon >= 2.2.1}
BuildRequires: %{python_module mock}
+BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
-Requires: python-acme >= 0.29.0
-Requires: python-certbot >= 0.34.0
+Requires: python-acme >= 0.31.0
+Requires: python-certbot >= 1.0.0
Requires: python-dns-lexicon >= 2.2.1
Requires: python-zope.interface
BuildArch: noarch
++++++ certbot-dns-dnsmadeeasy-0.40.1.tar.gz ->
certbot-dns-dnsmadeeasy-1.0.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/certbot-dns-dnsmadeeasy-0.40.1/MANIFEST.in
new/certbot-dns-dnsmadeeasy-1.0.0/MANIFEST.in
--- old/certbot-dns-dnsmadeeasy-0.40.1/MANIFEST.in 2019-11-06
03:24:51.000000000 +0100
+++ new/certbot-dns-dnsmadeeasy-1.0.0/MANIFEST.in 2019-12-03
18:20:30.000000000 +0100
@@ -1,3 +1,6 @@
include LICENSE.txt
include README.rst
recursive-include docs *
+recursive-include tests *
+global-exclude __pycache__
+global-exclude *.py[cod]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/certbot-dns-dnsmadeeasy-0.40.1/PKG-INFO
new/certbot-dns-dnsmadeeasy-1.0.0/PKG-INFO
--- old/certbot-dns-dnsmadeeasy-0.40.1/PKG-INFO 2019-11-06 03:25:09.000000000
+0100
+++ new/certbot-dns-dnsmadeeasy-1.0.0/PKG-INFO 2019-12-03 18:20:59.000000000
+0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: certbot-dns-dnsmadeeasy
-Version: 0.40.1
+Version: 1.0.0
Summary: DNS Made Easy DNS Authenticator plugin for Certbot
Home-page: https://github.com/certbot/certbot
Author: Certbot Project
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-dns-dnsmadeeasy-0.40.1/certbot_dns_dnsmadeeasy/_internal/__init__.py
new/certbot-dns-dnsmadeeasy-1.0.0/certbot_dns_dnsmadeeasy/_internal/__init__.py
---
old/certbot-dns-dnsmadeeasy-0.40.1/certbot_dns_dnsmadeeasy/_internal/__init__.py
1970-01-01 01:00:00.000000000 +0100
+++
new/certbot-dns-dnsmadeeasy-1.0.0/certbot_dns_dnsmadeeasy/_internal/__init__.py
2019-12-03 18:20:30.000000000 +0100
@@ -0,0 +1 @@
+"""Internal implementation of `~certbot_dns_dnsmadeeasy.dns_dnsmadeeasy`
plugin."""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-dns-dnsmadeeasy-0.40.1/certbot_dns_dnsmadeeasy/_internal/dns_dnsmadeeasy.py
new/certbot-dns-dnsmadeeasy-1.0.0/certbot_dns_dnsmadeeasy/_internal/dns_dnsmadeeasy.py
---
old/certbot-dns-dnsmadeeasy-0.40.1/certbot_dns_dnsmadeeasy/_internal/dns_dnsmadeeasy.py
1970-01-01 01:00:00.000000000 +0100
+++
new/certbot-dns-dnsmadeeasy-1.0.0/certbot_dns_dnsmadeeasy/_internal/dns_dnsmadeeasy.py
2019-12-03 18:20:30.000000000 +0100
@@ -0,0 +1,92 @@
+"""DNS Authenticator for DNS Made Easy DNS."""
+import logging
+
+import zope.interface
+from lexicon.providers import dnsmadeeasy
+
+from certbot import errors
+from certbot import interfaces
+from certbot.plugins import dns_common
+from certbot.plugins import dns_common_lexicon
+
+logger = logging.getLogger(__name__)
+
+ACCOUNT_URL = 'https://cp.dnsmadeeasy.com/account/info'
+
+
[email protected](interfaces.IAuthenticator)
[email protected](interfaces.IPluginFactory)
+class Authenticator(dns_common.DNSAuthenticator):
+ """DNS Authenticator for DNS Made Easy
+
+ This Authenticator uses the DNS Made Easy API to fulfill a dns-01
challenge.
+ """
+
+ description = ('Obtain certificates using a DNS TXT record (if you are
using DNS Made Easy for '
+ 'DNS).')
+ ttl = 60
+
+ def __init__(self, *args, **kwargs):
+ super(Authenticator, self).__init__(*args, **kwargs)
+ self.credentials = None
+
+ @classmethod
+ def add_parser_arguments(cls, add): # pylint: disable=arguments-differ
+ super(Authenticator, cls).add_parser_arguments(add,
default_propagation_seconds=60)
+ add('credentials', help='DNS Made Easy credentials INI file.')
+
+ def more_info(self): # pylint: disable=missing-docstring,no-self-use
+ return 'This plugin configures a DNS TXT record to respond to a dns-01
challenge using ' + \
+ 'the DNS Made Easy API.'
+
+ def _setup_credentials(self):
+ self.credentials = self._configure_credentials(
+ 'credentials',
+ 'DNS Made Easy credentials INI file',
+ {
+ 'api-key': 'API key for DNS Made Easy account, obtained from
{0}'
+ .format(ACCOUNT_URL),
+ 'secret-key': 'Secret key for DNS Made Easy account, obtained
from {0}'
+ .format(ACCOUNT_URL)
+ }
+ )
+
+ def _perform(self, domain, validation_name, validation):
+ self._get_dnsmadeeasy_client().add_txt_record(domain, validation_name,
validation)
+
+ def _cleanup(self, domain, validation_name, validation):
+ self._get_dnsmadeeasy_client().del_txt_record(domain, validation_name,
validation)
+
+ def _get_dnsmadeeasy_client(self):
+ return _DNSMadeEasyLexiconClient(self.credentials.conf('api-key'),
+ self.credentials.conf('secret-key'),
+ self.ttl)
+
+
+class _DNSMadeEasyLexiconClient(dns_common_lexicon.LexiconClient):
+ """
+ Encapsulates all communication with the DNS Made Easy via Lexicon.
+ """
+
+ def __init__(self, api_key, secret_key, ttl):
+ super(_DNSMadeEasyLexiconClient, self).__init__()
+
+ config = dns_common_lexicon.build_lexicon_config('dnsmadeeasy', {
+ 'ttl': ttl,
+ }, {
+ 'auth_username': api_key,
+ 'auth_token': secret_key,
+ })
+
+ self.provider = dnsmadeeasy.Provider(config)
+
+ def _handle_http_error(self, e, domain_name):
+ if domain_name in str(e) and str(e).startswith('404 Client Error: Not
Found for url:'):
+ return None
+
+ hint = None
+ if str(e).startswith('403 Client Error: Forbidden for url:'):
+ hint = 'Are your API key and Secret key values correct?'
+
+ return errors.PluginError('Error determining zone identifier: {0}.{1}'
+ .format(e, ' ({0})'.format(hint) if hint
else ''))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-dns-dnsmadeeasy-0.40.1/certbot_dns_dnsmadeeasy/dns_dnsmadeeasy.py
new/certbot-dns-dnsmadeeasy-1.0.0/certbot_dns_dnsmadeeasy/dns_dnsmadeeasy.py
---
old/certbot-dns-dnsmadeeasy-0.40.1/certbot_dns_dnsmadeeasy/dns_dnsmadeeasy.py
2019-11-06 03:24:51.000000000 +0100
+++
new/certbot-dns-dnsmadeeasy-1.0.0/certbot_dns_dnsmadeeasy/dns_dnsmadeeasy.py
1970-01-01 01:00:00.000000000 +0100
@@ -1,92 +0,0 @@
-"""DNS Authenticator for DNS Made Easy DNS."""
-import logging
-
-import zope.interface
-from lexicon.providers import dnsmadeeasy
-
-from certbot import errors
-from certbot import interfaces
-from certbot.plugins import dns_common
-from certbot.plugins import dns_common_lexicon
-
-logger = logging.getLogger(__name__)
-
-ACCOUNT_URL = 'https://cp.dnsmadeeasy.com/account/info'
-
-
[email protected](interfaces.IAuthenticator)
[email protected](interfaces.IPluginFactory)
-class Authenticator(dns_common.DNSAuthenticator):
- """DNS Authenticator for DNS Made Easy
-
- This Authenticator uses the DNS Made Easy API to fulfill a dns-01
challenge.
- """
-
- description = ('Obtain certificates using a DNS TXT record (if you are
using DNS Made Easy for '
- 'DNS).')
- ttl = 60
-
- def __init__(self, *args, **kwargs):
- super(Authenticator, self).__init__(*args, **kwargs)
- self.credentials = None
-
- @classmethod
- def add_parser_arguments(cls, add): # pylint: disable=arguments-differ
- super(Authenticator, cls).add_parser_arguments(add,
default_propagation_seconds=60)
- add('credentials', help='DNS Made Easy credentials INI file.')
-
- def more_info(self): # pylint: disable=missing-docstring,no-self-use
- return 'This plugin configures a DNS TXT record to respond to a dns-01
challenge using ' + \
- 'the DNS Made Easy API.'
-
- def _setup_credentials(self):
- self.credentials = self._configure_credentials(
- 'credentials',
- 'DNS Made Easy credentials INI file',
- {
- 'api-key': 'API key for DNS Made Easy account, obtained from
{0}'
- .format(ACCOUNT_URL),
- 'secret-key': 'Secret key for DNS Made Easy account, obtained
from {0}'
- .format(ACCOUNT_URL)
- }
- )
-
- def _perform(self, domain, validation_name, validation):
- self._get_dnsmadeeasy_client().add_txt_record(domain, validation_name,
validation)
-
- def _cleanup(self, domain, validation_name, validation):
- self._get_dnsmadeeasy_client().del_txt_record(domain, validation_name,
validation)
-
- def _get_dnsmadeeasy_client(self):
- return _DNSMadeEasyLexiconClient(self.credentials.conf('api-key'),
- self.credentials.conf('secret-key'),
- self.ttl)
-
-
-class _DNSMadeEasyLexiconClient(dns_common_lexicon.LexiconClient):
- """
- Encapsulates all communication with the DNS Made Easy via Lexicon.
- """
-
- def __init__(self, api_key, secret_key, ttl):
- super(_DNSMadeEasyLexiconClient, self).__init__()
-
- config = dns_common_lexicon.build_lexicon_config('dnsmadeeasy', {
- 'ttl': ttl,
- }, {
- 'auth_username': api_key,
- 'auth_token': secret_key,
- })
-
- self.provider = dnsmadeeasy.Provider(config)
-
- def _handle_http_error(self, e, domain_name):
- if domain_name in str(e) and str(e).startswith('404 Client Error: Not
Found for url:'):
- return None
-
- hint = None
- if str(e).startswith('403 Client Error: Forbidden for url:'):
- hint = 'Are your API key and Secret key values correct?'
-
- return errors.PluginError('Error determining zone identifier: {0}.{1}'
- .format(e, ' ({0})'.format(hint) if hint
else ''))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-dns-dnsmadeeasy-0.40.1/certbot_dns_dnsmadeeasy/dns_dnsmadeeasy_test.py
new/certbot-dns-dnsmadeeasy-1.0.0/certbot_dns_dnsmadeeasy/dns_dnsmadeeasy_test.py
---
old/certbot-dns-dnsmadeeasy-0.40.1/certbot_dns_dnsmadeeasy/dns_dnsmadeeasy_test.py
2019-11-06 03:24:51.000000000 +0100
+++
new/certbot-dns-dnsmadeeasy-1.0.0/certbot_dns_dnsmadeeasy/dns_dnsmadeeasy_test.py
1970-01-01 01:00:00.000000000 +0100
@@ -1,56 +0,0 @@
-"""Tests for certbot_dns_dnsmadeeasy.dns_dnsmadeeasy."""
-
-import unittest
-
-import mock
-from requests.exceptions import HTTPError
-
-from certbot.compat import os
-from certbot.plugins import dns_test_common
-from certbot.plugins import dns_test_common_lexicon
-from certbot.plugins.dns_test_common import DOMAIN
-from certbot.tests import util as test_util
-
-API_KEY = 'foo'
-SECRET_KEY = 'bar'
-
-
-class AuthenticatorTest(test_util.TempDirTestCase,
- dns_test_common_lexicon.BaseLexiconAuthenticatorTest):
-
- def setUp(self):
- super(AuthenticatorTest, self).setUp()
-
- from certbot_dns_dnsmadeeasy.dns_dnsmadeeasy import Authenticator
-
- path = os.path.join(self.tempdir, 'file.ini')
- dns_test_common.write({"dnsmadeeasy_api_key": API_KEY,
- "dnsmadeeasy_secret_key": SECRET_KEY},
- path)
-
- self.config = mock.MagicMock(dnsmadeeasy_credentials=path,
- dnsmadeeasy_propagation_seconds=0) #
don't wait during tests
-
- self.auth = Authenticator(self.config, "dnsmadeeasy")
-
- self.mock_client = mock.MagicMock()
- # _get_dnsmadeeasy_client | pylint: disable=protected-access
- self.auth._get_dnsmadeeasy_client =
mock.MagicMock(return_value=self.mock_client)
-
-
-class DNSMadeEasyLexiconClientTest(unittest.TestCase,
-
dns_test_common_lexicon.BaseLexiconClientTest):
- DOMAIN_NOT_FOUND = HTTPError('404 Client Error: Not Found for url:
{0}.'.format(DOMAIN))
- LOGIN_ERROR = HTTPError('403 Client Error: Forbidden for url:
{0}.'.format(DOMAIN))
-
- def setUp(self):
- from certbot_dns_dnsmadeeasy.dns_dnsmadeeasy import
_DNSMadeEasyLexiconClient
-
- self.client = _DNSMadeEasyLexiconClient(API_KEY, SECRET_KEY, 0)
-
- self.provider_mock = mock.MagicMock()
- self.client.provider = self.provider_mock
-
-
-if __name__ == "__main__":
- unittest.main() # pragma: no cover
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-dns-dnsmadeeasy-0.40.1/certbot_dns_dnsmadeeasy.egg-info/PKG-INFO
new/certbot-dns-dnsmadeeasy-1.0.0/certbot_dns_dnsmadeeasy.egg-info/PKG-INFO
---
old/certbot-dns-dnsmadeeasy-0.40.1/certbot_dns_dnsmadeeasy.egg-info/PKG-INFO
2019-11-06 03:25:09.000000000 +0100
+++ new/certbot-dns-dnsmadeeasy-1.0.0/certbot_dns_dnsmadeeasy.egg-info/PKG-INFO
2019-12-03 18:20:59.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: certbot-dns-dnsmadeeasy
-Version: 0.40.1
+Version: 1.0.0
Summary: DNS Made Easy DNS Authenticator plugin for Certbot
Home-page: https://github.com/certbot/certbot
Author: Certbot Project
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-dns-dnsmadeeasy-0.40.1/certbot_dns_dnsmadeeasy.egg-info/SOURCES.txt
new/certbot-dns-dnsmadeeasy-1.0.0/certbot_dns_dnsmadeeasy.egg-info/SOURCES.txt
---
old/certbot-dns-dnsmadeeasy-0.40.1/certbot_dns_dnsmadeeasy.egg-info/SOURCES.txt
2019-11-06 03:25:09.000000000 +0100
+++
new/certbot-dns-dnsmadeeasy-1.0.0/certbot_dns_dnsmadeeasy.egg-info/SOURCES.txt
2019-12-03 18:20:59.000000000 +0100
@@ -4,18 +4,18 @@
setup.cfg
setup.py
certbot_dns_dnsmadeeasy/__init__.py
-certbot_dns_dnsmadeeasy/dns_dnsmadeeasy.py
-certbot_dns_dnsmadeeasy/dns_dnsmadeeasy_test.py
certbot_dns_dnsmadeeasy.egg-info/PKG-INFO
certbot_dns_dnsmadeeasy.egg-info/SOURCES.txt
certbot_dns_dnsmadeeasy.egg-info/dependency_links.txt
certbot_dns_dnsmadeeasy.egg-info/entry_points.txt
certbot_dns_dnsmadeeasy.egg-info/requires.txt
certbot_dns_dnsmadeeasy.egg-info/top_level.txt
+certbot_dns_dnsmadeeasy/_internal/__init__.py
+certbot_dns_dnsmadeeasy/_internal/dns_dnsmadeeasy.py
docs/.gitignore
docs/Makefile
docs/api.rst
docs/conf.py
docs/index.rst
docs/make.bat
-docs/api/dns_dnsmadeeasy.rst
\ No newline at end of file
+tests/dns_dnsmadeeasy_test.py
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-dns-dnsmadeeasy-0.40.1/certbot_dns_dnsmadeeasy.egg-info/entry_points.txt
new/certbot-dns-dnsmadeeasy-1.0.0/certbot_dns_dnsmadeeasy.egg-info/entry_points.txt
---
old/certbot-dns-dnsmadeeasy-0.40.1/certbot_dns_dnsmadeeasy.egg-info/entry_points.txt
2019-11-06 03:25:09.000000000 +0100
+++
new/certbot-dns-dnsmadeeasy-1.0.0/certbot_dns_dnsmadeeasy.egg-info/entry_points.txt
2019-12-03 18:20:59.000000000 +0100
@@ -1,3 +1,3 @@
[certbot.plugins]
-dns-dnsmadeeasy = certbot_dns_dnsmadeeasy.dns_dnsmadeeasy:Authenticator
+dns-dnsmadeeasy =
certbot_dns_dnsmadeeasy._internal.dns_dnsmadeeasy:Authenticator
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-dns-dnsmadeeasy-0.40.1/docs/api/dns_dnsmadeeasy.rst
new/certbot-dns-dnsmadeeasy-1.0.0/docs/api/dns_dnsmadeeasy.rst
--- old/certbot-dns-dnsmadeeasy-0.40.1/docs/api/dns_dnsmadeeasy.rst
2019-11-06 03:24:51.000000000 +0100
+++ new/certbot-dns-dnsmadeeasy-1.0.0/docs/api/dns_dnsmadeeasy.rst
1970-01-01 01:00:00.000000000 +0100
@@ -1,5 +0,0 @@
-:mod:`certbot_dns_dnsmadeeasy.dns_dnsmadeeasy`
-------------------------------------
-
-.. automodule:: certbot_dns_dnsmadeeasy.dns_dnsmadeeasy
- :members:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/certbot-dns-dnsmadeeasy-0.40.1/docs/api.rst
new/certbot-dns-dnsmadeeasy-1.0.0/docs/api.rst
--- old/certbot-dns-dnsmadeeasy-0.40.1/docs/api.rst 2019-11-06
03:24:51.000000000 +0100
+++ new/certbot-dns-dnsmadeeasy-1.0.0/docs/api.rst 2019-12-03
18:20:30.000000000 +0100
@@ -2,7 +2,4 @@
API Documentation
=================
-.. toctree::
- :glob:
-
- api/**
+Certbot plugins implement the Certbot plugins API, and do not otherwise have
an external API.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/certbot-dns-dnsmadeeasy-0.40.1/setup.py
new/certbot-dns-dnsmadeeasy-1.0.0/setup.py
--- old/certbot-dns-dnsmadeeasy-0.40.1/setup.py 2019-11-06 03:24:52.000000000
+0100
+++ new/certbot-dns-dnsmadeeasy-1.0.0/setup.py 2019-12-03 18:20:32.000000000
+0100
@@ -1,8 +1,10 @@
from setuptools import setup
from setuptools import find_packages
+from setuptools.command.test import test as TestCommand
+import sys
-version = '0.40.1'
+version = '1.0.0'
# Remember to update local-oldest-requirements.txt when changing the minimum
# acme/certbot version.
@@ -20,6 +22,20 @@
'sphinx_rtd_theme',
]
+class PyTest(TestCommand):
+ user_options = []
+
+ def initialize_options(self):
+ TestCommand.initialize_options(self)
+ self.pytest_args = ''
+
+ def run_tests(self):
+ import shlex
+ # import here, cause outside the eggs aren't loaded
+ import pytest
+ errno = pytest.main(shlex.split(self.pytest_args))
+ sys.exit(errno)
+
setup(
name='certbot-dns-dnsmadeeasy',
version=version,
@@ -60,8 +76,10 @@
},
entry_points={
'certbot.plugins': [
- 'dns-dnsmadeeasy =
certbot_dns_dnsmadeeasy.dns_dnsmadeeasy:Authenticator',
+ 'dns-dnsmadeeasy =
certbot_dns_dnsmadeeasy._internal.dns_dnsmadeeasy:Authenticator',
],
},
+ tests_require=["pytest"],
test_suite='certbot_dns_dnsmadeeasy',
+ cmdclass={"test": PyTest},
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-dns-dnsmadeeasy-0.40.1/tests/dns_dnsmadeeasy_test.py
new/certbot-dns-dnsmadeeasy-1.0.0/tests/dns_dnsmadeeasy_test.py
--- old/certbot-dns-dnsmadeeasy-0.40.1/tests/dns_dnsmadeeasy_test.py
1970-01-01 01:00:00.000000000 +0100
+++ new/certbot-dns-dnsmadeeasy-1.0.0/tests/dns_dnsmadeeasy_test.py
2019-12-03 18:20:30.000000000 +0100
@@ -0,0 +1,56 @@
+"""Tests for certbot_dns_dnsmadeeasy._internal.dns_dnsmadeeasy."""
+
+import unittest
+
+import mock
+from requests.exceptions import HTTPError
+
+from certbot.compat import os
+from certbot.plugins import dns_test_common
+from certbot.plugins import dns_test_common_lexicon
+from certbot.plugins.dns_test_common import DOMAIN
+from certbot.tests import util as test_util
+
+API_KEY = 'foo'
+SECRET_KEY = 'bar'
+
+
+class AuthenticatorTest(test_util.TempDirTestCase,
+ dns_test_common_lexicon.BaseLexiconAuthenticatorTest):
+
+ def setUp(self):
+ super(AuthenticatorTest, self).setUp()
+
+ from certbot_dns_dnsmadeeasy._internal.dns_dnsmadeeasy import
Authenticator
+
+ path = os.path.join(self.tempdir, 'file.ini')
+ dns_test_common.write({"dnsmadeeasy_api_key": API_KEY,
+ "dnsmadeeasy_secret_key": SECRET_KEY},
+ path)
+
+ self.config = mock.MagicMock(dnsmadeeasy_credentials=path,
+ dnsmadeeasy_propagation_seconds=0) #
don't wait during tests
+
+ self.auth = Authenticator(self.config, "dnsmadeeasy")
+
+ self.mock_client = mock.MagicMock()
+ # _get_dnsmadeeasy_client | pylint: disable=protected-access
+ self.auth._get_dnsmadeeasy_client =
mock.MagicMock(return_value=self.mock_client)
+
+
+class DNSMadeEasyLexiconClientTest(unittest.TestCase,
+
dns_test_common_lexicon.BaseLexiconClientTest):
+ DOMAIN_NOT_FOUND = HTTPError('404 Client Error: Not Found for url:
{0}.'.format(DOMAIN))
+ LOGIN_ERROR = HTTPError('403 Client Error: Forbidden for url:
{0}.'.format(DOMAIN))
+
+ def setUp(self):
+ from certbot_dns_dnsmadeeasy._internal.dns_dnsmadeeasy import
_DNSMadeEasyLexiconClient
+
+ self.client = _DNSMadeEasyLexiconClient(API_KEY, SECRET_KEY, 0)
+
+ self.provider_mock = mock.MagicMock()
+ self.client.provider = self.provider_mock
+
+
+if __name__ == "__main__":
+ unittest.main() # pragma: no cover