Changeset - 78c8218ee60a
[Not reviewed]
0 1 0
Branko Majic (branko) - 6 years ago 2018-04-11 22:36:23
branko@majic.rs
GC-22: Refactored functional test for client certificate issuance via CSR to use pytest fixture for reading file content.
1 file changed with 3 insertions and 5 deletions:
0 comments (0 inline, 0 general)
functional_tests/test_csr.py
Show inline comments
 
@@ -84,11 +84,9 @@ def test_client_certificate_issuance_by_passing_csr_as_file(tmpdir):
 

	
 
    # John notices that the content of stored CSR is identical to the
 
    # one he provided.
 
    with open("myclient1.csr.pem", "r") as original_csr_file, open(".gimmecert/client/myclient1.csr.pem", "r") as stored_csr_file:
 
        original_csr = original_csr_file.read()
 
        stored_csr = stored_csr_file.read()
 

	
 
        assert original_csr == stored_csr
 
    original_csr = tmpdir.join("myclient1.csr.pem").read()
 
    stored_csr = tmpdir.join(".gimmecert", "client", "myclient1.csr.pem").read()
 
    assert original_csr == stored_csr
 

	
 
    # John then quickly has a look at the public key associated with
 
    # the private key, and public key stored in certificate.
0 comments (0 inline, 0 general)