Commit 98c549e5 authored by Aurel's avatar Aurel

naming update

parent 8c6557e7
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
# See COPYING file for full licensing terms. # See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options. # See https://www.nexedi.com/licensing for rationale and options.
#from six import StringIO
from io import BytesIO as StringIO from io import BytesIO as StringIO
import contextlib import contextlib
import datetime import datetime
...@@ -72,9 +71,7 @@ class KedifaMixin(object): ...@@ -72,9 +71,7 @@ class KedifaMixin(object):
self.addCleanup(cleanTestDir) self.addCleanup(cleanTestDir)
class KedifaCaucaseMixin(KedifaMixin): class KedifaMixinCaucase(KedifaMixin):
# if six.PY2:
# assertRegex = unittest.TestCase.assertRegexpMatches
def createKey(self): def createKey(self):
"""Generates a key and return a tuple containing the RSAPrivateKey """Generates a key and return a tuple containing the RSAPrivateKey
...@@ -87,7 +84,7 @@ class KedifaCaucaseMixin(KedifaMixin): ...@@ -87,7 +84,7 @@ class KedifaCaucaseMixin(KedifaMixin):
format=serialization.PrivateFormat.TraditionalOpenSSL, format=serialization.PrivateFormat.TraditionalOpenSSL,
encryption_algorithm=serialization.NoEncryption() encryption_algorithm=serialization.NoEncryption()
) )
return key, key_pem#.decode('ascii') return key, key_pem
def generateCSR(self, ip): def generateCSR(self, ip):
key_pem_file = os.path.join(self.testdir, '%s-key.pem' % (ip,)) key_pem_file = os.path.join(self.testdir, '%s-key.pem' % (ip,))
...@@ -301,7 +298,7 @@ class KedifaCaucaseMixin(KedifaMixin): ...@@ -301,7 +298,7 @@ class KedifaCaucaseMixin(KedifaMixin):
return reserved_reference return reserved_reference
def setUp(self): def setUp(self):
super(KedifaCaucaseMixin, self).setUp() super(KedifaMixinCaucase, self).setUp()
self.createPem() self.createPem()
self.setUpCaucase() self.setUpCaucase()
...@@ -317,7 +314,7 @@ class KedifaCaucaseMixin(KedifaMixin): ...@@ -317,7 +314,7 @@ class KedifaCaucaseMixin(KedifaMixin):
def requests_put(self, *args, **kwargs): def requests_put(self, *args, **kwargs):
return requests.put(verify=self.ca_crt_pem, *args, **kwargs) return requests.put(verify=self.ca_crt_pem, *args, **kwargs)
class KedifaIntegrationTest(KedifaCaucaseMixin, unittest.TestCase): class KedifaIntegrationTest(KedifaMixinCaucase, unittest.TestCase):
def assertAnyLogEntry(self, entry): def assertAnyLogEntry(self, entry):
with open(self.logfile) as fh: with open(self.logfile) as fh:
log_line_list = fh.readlines() log_line_list = fh.readlines()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment