mirror of
https://github.com/certbot/certbot.git
synced 2026-08-02 19:31:51 +02:00
Fix digitalocean plugin tests for Python 3 (#4821)
assertItemsEqual() doesn't exist in Python 3.x. Travis didn't fail because of some nose errors (so not all tests were run).
This commit is contained in:
@@ -5,6 +5,7 @@ import unittest
|
|||||||
|
|
||||||
import digitalocean
|
import digitalocean
|
||||||
import mock
|
import mock
|
||||||
|
import six
|
||||||
|
|
||||||
from certbot import errors
|
from certbot import errors
|
||||||
from certbot.plugins import dns_test_common
|
from certbot.plugins import dns_test_common
|
||||||
@@ -133,8 +134,8 @@ class DigitalOceanClientTest(unittest.TestCase):
|
|||||||
|
|
||||||
correct_record_mock.destroy.assert_called()
|
correct_record_mock.destroy.assert_called()
|
||||||
|
|
||||||
self.assertItemsEqual(first_record_mock.destroy.call_args_list, [])
|
six.assertCountEqual(self, first_record_mock.destroy.call_args_list, [])
|
||||||
self.assertItemsEqual(last_record_mock.destroy.call_args_list, [])
|
six.assertCountEqual(self, last_record_mock.destroy.call_args_list, [])
|
||||||
|
|
||||||
def test_del_txt_record_error_finding_domain(self):
|
def test_del_txt_record_error_finding_domain(self):
|
||||||
self.manager.get_all_domains.side_effect = API_ERROR
|
self.manager.get_all_domains.side_effect = API_ERROR
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ install_requires = [
|
|||||||
# For pkg_resources. >=1.0 so pip resolves it to a version cryptography
|
# For pkg_resources. >=1.0 so pip resolves it to a version cryptography
|
||||||
# will tolerate; see #2599:
|
# will tolerate; see #2599:
|
||||||
'setuptools>=1.0',
|
'setuptools>=1.0',
|
||||||
|
'six',
|
||||||
'zope.interface',
|
'zope.interface',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user