py3 unittest fix
This commit is contained in:
Ayub khan
2019-09-03 16:06:48 +05:00
parent dd26f3bc12
commit 6b884c98b6

View File

@@ -181,7 +181,10 @@ class CertificatesBaseTestCase(object):
with self.assertRaises(Exception) as context:
CertificateManager.validate(json_data_1)
self.assertIn("Unsupported certificate schema version: 100. Expected version: 1.", context.exception)
self.assertIn(
"Unsupported certificate schema version: 100. Expected version: 1.",
str(context.exception)
)
#Test certificate name is missing
json_data_2 = {
@@ -192,7 +195,7 @@ class CertificatesBaseTestCase(object):
with self.assertRaises(Exception) as context:
CertificateManager.validate(json_data_2)
self.assertIn('must have name of the certificate', context.exception)
self.assertIn('must have name of the certificate', str(context.exception))
@ddt.ddt