<commit_before>import unittest, os, time
import acme_dns_tiny
from tests.config_factory import generate_acme_account_deactivate_config
import tools.acme_account_deactivate

ACMEDirectory = os.getenv("GITLABCI_ACMEDIRECTORY_V2", "https://acme-staging-v02.api.letsencrypt.org/directory")

class TestACMEAccountDeactivate(unittest.TestCase):
    "Tests for acme_account_deactivate"

    @classmethod
    def setUpClass(self):
        self.configs = generate_acme_account_deactivate_config()
        acme_dns_tiny.main([self.configs['config']])
        super(TestACMEAccountDeactivate, self).setUpClass()

    # To clean ACME staging server and close correctly temporary files
    @classmethod
    def tearDownClass(self):
        # Remove temporary files
        os.remove(self.configs['config'])
        os.remove(self.configs['key'])
        super(TestACMEAccountDeactivate, self).tearDownClass()<commit_msg>test account deactivate: don't fail if a non-regesitering error occured<commit_after>import unittest, os, time
import acme_dns_tiny
from tests.config_factory import generate_acme_account_deactivate_config
import tools.acme_account_deactivate

ACMEDirectory = os.getenv("GITLABCI_ACMEDIRECTORY_V2", "https://acme-staging-v02.api.letsencrypt.org/directory")

class TestACMEAccountDeactivate(unittest.TestCase):
    "Tests for acme_account_deactivate"

    @classmethod
    def setUpClass(self):
        self.configs = generate_acme_account_deactivate_config()
        try:
            acme_dns_tiny.main([self.configs['config']])
        except ValueError as err:
            if str(err).startswith("Error register"):
                raise ValueError("Fail test as account has not been registered correctly: {0}".format(err))
        
        super(TestACMEAccountDeactivate, self).setUpClass()

    # To clean ACME staging server and close correctly temporary files
    @classmethod
    def tearDownClass(self):
        # Remove temporary files
        os.remove(self.configs['config'])
        os.remove(self.configs['key'])
        super(TestACMEAccountDeactivate, self).tearDownClass()
{'fraction_non_alphanumeric': 0.09025787965616046, 'fraction_numerical': 0.0033428844317096467, 'mean_word_length': 4.224438902743142, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7573550', 'n_tokens_mistral': 631, 'n_tokens_neox': 625, 'n_words': 123}