__init__.py 461 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
from OpenSSL import crypto
import unittest
import tempfile
import shutil
import os

from autoca import ca


class CaTestBase(unittest.TestCase):

    def setUp(self):
        self.tmpdir = tempfile.mkdtemp()
        self.ca_subject = {'CN': 'Test CA',
                           'O': 'Test Corp.',
                           'L': 'IE'}
        self.ca = ca.CA(self.tmpdir, self.ca_subject, bits=1024)

    def tearDown(self):
        shutil.rmtree(self.tmpdir)