Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/certbot/certbot.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMads Jensen <mje@inducks.org>2022-01-05 01:59:58 +0300
committerGitHub <noreply@github.com>2022-01-05 01:59:58 +0300
commited7964b424345b5d8ad98335be8f98d5c21059a6 (patch)
treee7feeb7e5d84c77a589b659c993a7112a38b6bf0 /certbot-dns-rfc2136/tests/dns_rfc2136_test.py
parent97a09dee19273a6c43aa71edc04ecfae3e761314 (diff)
Improve assertions in nginx and DNS plugin tests. (#9157)
* Improve assertions in nginx and DNS plugin tests. * Use assertIs for asserting is True/False.
Diffstat (limited to 'certbot-dns-rfc2136/tests/dns_rfc2136_test.py')
-rw-r--r--certbot-dns-rfc2136/tests/dns_rfc2136_test.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/certbot-dns-rfc2136/tests/dns_rfc2136_test.py b/certbot-dns-rfc2136/tests/dns_rfc2136_test.py
index 72ea6d9a4..d0434aef5 100644
--- a/certbot-dns-rfc2136/tests/dns_rfc2136_test.py
+++ b/certbot-dns-rfc2136/tests/dns_rfc2136_test.py
@@ -23,6 +23,7 @@ SECRET = 'SSB3b25kZXIgd2hvIHdpbGwgYm90aGVyIHRvIGRlY29kZSB0aGlzIHRleHQK'
VALID_CONFIG = {"rfc2136_server": SERVER, "rfc2136_name": NAME, "rfc2136_secret": SECRET}
TIMEOUT = 45
+
class AuthenticatorTest(test_util.TempDirTestCase, dns_test_common.BaseAuthenticatorTest):
def setUp(self):
@@ -113,7 +114,7 @@ class RFC2136ClientTest(unittest.TestCase):
self.rfc2136_client.add_txt_record("bar", "baz", 42)
query_mock.assert_called_with(mock.ANY, SERVER, TIMEOUT, PORT)
- self.assertTrue("bar. 42 IN TXT \"baz\"" in str(query_mock.call_args[0][0]))
+ self.assertIn('bar. 42 IN TXT "baz"', str(query_mock.call_args[0][0]))
@mock.patch("dns.query.tcp")
def test_add_txt_record_wraps_errors(self, query_mock):
@@ -146,7 +147,7 @@ class RFC2136ClientTest(unittest.TestCase):
self.rfc2136_client.del_txt_record("bar", "baz")
query_mock.assert_called_with(mock.ANY, SERVER, TIMEOUT, PORT)
- self.assertTrue("bar. 0 NONE TXT \"baz\"" in str(query_mock.call_args[0][0]))
+ self.assertIn('bar. 0 NONE TXT "baz"', str(query_mock.call_args[0][0]))
@mock.patch("dns.query.tcp")
def test_del_txt_record_wraps_errors(self, query_mock):