Commit 61dd2329 authored by Aurel's avatar Aurel

apply master change & remove useless six

parent 98c549e5
......@@ -98,7 +98,7 @@ class KedifaMixinCaucase(KedifaMixin):
x509.NameAttribute(NameOID.ORGANIZATION_NAME, u"KeDiFa Test"),
])).add_extension(
x509.SubjectAlternativeName([
x509.IPAddress(ipaddress.ip_address(six.text_type(ip)))
x509.IPAddress(ipaddress.ip_address(ip))
]),
critical=False,
).sign(key, hashes.SHA256(), default_backend())
......@@ -112,14 +112,6 @@ class KedifaMixinCaucase(KedifaMixin):
self,
not_valid_before=datetime.datetime.utcnow() - datetime.timedelta(days=1),
not_valid_after=datetime.datetime.utcnow() + datetime.timedelta(days=2)):
"""Generates certificate and key
Returns a tuple with:
- key as a classcryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKey
- pem encoded key as string
- certificate as a cryptography.x509.Certificate
- pem encoded certificate as string
"""
key, key_pem = self.createKey()
subject = issuer = x509.Name([
x509.NameAttribute(NameOID.COUNTRY_NAME, u"XX"),
......@@ -171,9 +163,9 @@ class KedifaMixinCaucase(KedifaMixin):
self.caucase_runtime.start()
self.assertTrue(self.caucase_runtime.is_alive())
self.caucase_url = 'http://[%s]:%s' % (ip, port)
# give 10s for caucase to be available
# give 5s for caucase to be available
b = time.time()
for i in range(100):
for i in range(50):
try:
requests.get(self.caucase_url)
except BaseException:
......
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