From 6b454a545522203bae20cc67c3e1589efe38ee94 Mon Sep 17 00:00:00 2001 From: Adrien Dorsaz Date: Mon, 1 Jun 2020 18:53:55 +0200 Subject: [PATCH] tests: acme_dns_tiny: fix tearDown clean configuration files --- tests/staging_test_acme_dns_tiny.py | 4 ++-- tests/unit_test_acme_dns_tiny.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/staging_test_acme_dns_tiny.py b/tests/staging_test_acme_dns_tiny.py index cfc3f44..7accaa6 100644 --- a/tests/staging_test_acme_dns_tiny.py +++ b/tests/staging_test_acme_dns_tiny.py @@ -42,7 +42,7 @@ class TestACMEDNSTiny(unittest.TestCase): # close temp files correctly for conffile in cls.configs: parser = configparser.ConfigParser() - parser.read(conffile) + parser.read(cls.configs[conffile]) try: os.remove(parser["acmednstiny"]["AccountKeyFile"]) except: @@ -58,7 +58,7 @@ class TestACMEDNSTiny(unittest.TestCase): except: pass try: - os.remove(conffile) + os.remove(cls.configs[conffile]) except: pass super(TestACMEDNSTiny, cls).tearDownClass() diff --git a/tests/unit_test_acme_dns_tiny.py b/tests/unit_test_acme_dns_tiny.py index e7de60d..855839e 100644 --- a/tests/unit_test_acme_dns_tiny.py +++ b/tests/unit_test_acme_dns_tiny.py @@ -25,10 +25,10 @@ class TestACMEDNSTiny(unittest.TestCase): # close temp files correctly for conffile in cls.configs: parser = configparser.ConfigParser() - parser.read(conffile) + parser.read(cls.configs[conffile]) os.remove(parser["acmednstiny"]["AccountKeyFile"]) os.remove(parser["acmednstiny"]["CSRFile"]) - os.remove(conffile) + os.remove(cls.configs[conffile]) super(TestACMEDNSTiny, cls).tearDownClass() -- GitLab