Projekt

Obecné

Profil

« Předchozí | Další » 

Revize da0fc952

Přidáno uživatelem Stanislav Král před téměř 4 roky(ů)

Added a global error handler for CryptographyException errors.
Added a dependency ony pytest-mock library in order to be able to mock method calls in tests.
Covered the added global CryptographyException error handler in a test.

Zobrazit rozdíly:

app.py
90 90
    return certificate_controller.generate_certificate_pkcs_identity(id)
91 91

  
92 92

  
93
@app.errorhandler(CryptographyException)
94
def cryptography_error(e, certificate_controller: CertController):
95
    return certificate_controller.handle_cryptography_error(e)
96

  
97

  
93 98
def initialize_app(application) -> bool:
94 99
    """
95 100
    Initializes the application

Také k dispozici: Unified diff