mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 05:59:44 -04:00
reformat private key
This commit is contained in:
@@ -3,6 +3,7 @@ import uuid
|
||||
import pytest
|
||||
from flask import url_for
|
||||
|
||||
from app.main.views.sign_in import _reformulate_keystring
|
||||
from app.models.user import User
|
||||
from tests.conftest import SERVICE_ONE_ID, normalize_spaces
|
||||
|
||||
@@ -39,6 +40,16 @@ def test_render_sign_in_template_with_next_link_for_password_reset(client_reques
|
||||
)
|
||||
|
||||
|
||||
def test_reformulate_keystring():
|
||||
orig = "-----BEGIN PRIVATE KEY----- blahblahblah -----END PRIVATE KEY-----"
|
||||
expected = """-----BEGIN PRIVATE KEY-----
|
||||
blahblahblah
|
||||
-----END PRIVATE KEY-----
|
||||
"""
|
||||
reformulated = _reformulate_keystring(orig)
|
||||
assert reformulated == expected
|
||||
|
||||
|
||||
def test_sign_in_explains_session_timeout(client_request):
|
||||
client_request.logout()
|
||||
page = client_request.get("main.sign_in", next="/foo")
|
||||
|
||||
Reference in New Issue
Block a user