tests.tlstests.test_caroutes

Test the CA routes

Module Contents

Functions

test_have_csrfile(csrfile)

Check that csr generation works

test_have_mtlscert(mtlsfiles)

Test that we got the files

test_sign(csrfile, kraftwerk_jwt_client)

Test signing

test_sign_twice(csrfile, kraftwerk_jwt_client)

Test using same nonce twice, should fail

test_sign_revoke_mtls(datadir)

Test signing as product

Attributes

LOGGER

LOGGER[source]
test_have_csrfile(csrfile)[source]

Check that csr generation works

Parameters:

csrfile (pathlib.Path)

Return type:

None

async test_have_mtlscert(mtlsfiles)[source]

Test that we got the files

Parameters:

mtlsfiles (Tuple[pathlib.Path, pathlib.Path])

Return type:

None

async test_sign(csrfile, kraftwerk_jwt_client)[source]

Test signing

Parameters:
  • csrfile (pathlib.Path)

  • kraftwerk_jwt_client (async_asgi_testclient.TestClient)

Return type:

None

async test_sign_twice(csrfile, kraftwerk_jwt_client)[source]

Test using same nonce twice, should fail

Parameters:
  • csrfile (pathlib.Path)

  • kraftwerk_jwt_client (async_asgi_testclient.TestClient)

Return type:

None

async test_sign_revoke_mtls(datadir)[source]

Test signing as product

Parameters:

datadir (pathlib.Path)

Return type:

None