Commit 43c0b5de authored by Jérome Perrin's avatar Jérome Perrin

test: name Mixin with MixinPrefix

pylint understands this and does not report errors about accessing
undefined members.

http://pylint.pycqa.org/en/stable/faq.html#how-do-i-avoid-access-to-undefined-member-messages-in-my-mixin-classes
parent cdb01d8a
...@@ -80,7 +80,8 @@ class KedifaMixin(object): ...@@ -80,7 +80,8 @@ class KedifaMixin(object):
self.addCleanup(cleanTestDir) self.addCleanup(cleanTestDir)
class KedifaMixinCaucase(KedifaMixin): class KedifaCaucaseMixin(KedifaMixin):
def createKey(self): def createKey(self):
key = rsa.generate_private_key( key = rsa.generate_private_key(
public_exponent=65537, key_size=2048, backend=default_backend()) public_exponent=65537, key_size=2048, backend=default_backend())
...@@ -289,7 +290,7 @@ class KedifaMixinCaucase(KedifaMixin): ...@@ -289,7 +290,7 @@ class KedifaMixinCaucase(KedifaMixin):
return reserved_reference return reserved_reference
def setUp(self): def setUp(self):
super(KedifaMixinCaucase, self).setUp() super(KedifaCaucaseMixin, self).setUp()
self.createPem() self.createPem()
self.setUpCaucase() self.setUpCaucase()
...@@ -306,7 +307,7 @@ class KedifaMixinCaucase(KedifaMixin): ...@@ -306,7 +307,7 @@ class KedifaMixinCaucase(KedifaMixin):
return requests.put(verify=self.ca_crt_pem, *args, **kwargs) return requests.put(verify=self.ca_crt_pem, *args, **kwargs)
class KedifaIntegrationTest(KedifaMixinCaucase, unittest.TestCase): class KedifaIntegrationTest(KedifaCaucaseMixin, 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