File diff de1cc2505a56 → d52b62b9a9db
tests/test_commands.py
Show inline comments
 
@@ -1433,3 +1433,15 @@ def test_renew_client_reads_csr_from_stdin(mock_read_input, sample_project_direc
 
    assert stored_csr_public_numbers == custom_csr_public_numbers
 
    assert certificate_public_numbers == custom_csr_public_numbers
 
    assert certificate.subject != key_with_csr.csr.subject
 

	
 

	
 
def test_server_uses_same_private_key_algorithm_and_parameters_as_issuer_when_generating_private_key(tmpdir):
 

	
 
    private_key_file = tmpdir.join('.gimmecert', 'server', 'myserver.key.pem')
 

	
 
    gimmecert.commands.init(io.StringIO(), io.StringIO(), tmpdir.strpath, tmpdir.basename, 1, ("rsa", 1024))
 
    gimmecert.commands.server(io.StringIO(), io.StringIO(), tmpdir.strpath, 'myserver', None, None)
 

	
 
    private_key = gimmecert.storage.read_private_key(private_key_file.strpath)
 

	
 
    assert private_key.key_size == 1024