Commit fe3f7806 authored by Aurel's avatar Aurel

fix assertRegex and remove print

parent 61dd2329
...@@ -210,7 +210,6 @@ class KedifaMixinCaucase(KedifaMixin): ...@@ -210,7 +210,6 @@ class KedifaMixinCaucase(KedifaMixin):
csr_id = output.split()[0].decode() csr_id = output.split()[0].decode()
except IndexError: except IndexError:
self.fail('csr_id parse failed: %s' % (output,)) self.fail('csr_id parse failed: %s' % (output,))
print("%r %r %r" %(self.cas, csr_id, kedifa_key_pem))
caucase.cli.main(argv=self.cas + [ caucase.cli.main(argv=self.cas + [
'--get-crt', csr_id, kedifa_key_pem '--get-crt', csr_id, kedifa_key_pem
]) ])
...@@ -272,12 +271,12 @@ class KedifaMixinCaucase(KedifaMixin): ...@@ -272,12 +271,12 @@ class KedifaMixinCaucase(KedifaMixin):
six.moves.http_client.CREATED six.moves.http_client.CREATED
) )
location = result.headers.get('Location', '') location = result.headers.get('Location', '')
self.assertRegex( self.assertRegexpMatches(
location, location,
r'^/[a-z0-9]{32}$' r'^/[a-z0-9]{32}$'
) )
reserved_reference = result.text reserved_reference = result.text
self.assertRegex( self.assertRegexpMatches(
reserved_reference, reserved_reference,
r'^[a-z0-9]{32}$' r'^[a-z0-9]{32}$'
) )
...@@ -884,7 +883,7 @@ class KedifaIntegrationTest(KedifaMixinCaucase, unittest.TestCase): ...@@ -884,7 +883,7 @@ class KedifaIntegrationTest(KedifaMixinCaucase, unittest.TestCase):
def test_GET_generateauth(self): def test_GET_generateauth(self):
auth = self.generateauth() auth = self.generateauth()
self.assertRegex( self.assertRegexpMatches(
auth, auth,
r'^[a-z0-9]{32}$' r'^[a-z0-9]{32}$'
) )
...@@ -929,7 +928,7 @@ class KedifaIntegrationTest(KedifaMixinCaucase, unittest.TestCase): ...@@ -929,7 +928,7 @@ class KedifaIntegrationTest(KedifaMixinCaucase, unittest.TestCase):
'', '',
result.text result.text
) )
self.assertRegex( self.assertRegexpMatches(
result.headers.get('Location', ''), result.headers.get('Location', ''),
r'^/%s/\d+$' % key r'^/%s/\d+$' % key
) )
......
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