Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
Jyrno42 committed Dec 31, 2024
1 parent ac4b5c9 commit b6e1cc8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions esteid/mobileid/tests/test_authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import pyasice

from ..utils import get_verification_code
from ...constants import HASH_ALGORITHMS, HASH_SHA256, HASH_SHA384, HASH_SHA512
from ...exceptions import (
ActionInProgress,
Expand All @@ -24,6 +23,7 @@
from ..base import MobileIDService
from ..constants import EndResults
from ..types import AuthenticateResult, AuthenticateStatusResult
from ..utils import get_verification_code


def run_authentication_flow(demo_mid_api, id_number, phone_number, hash_type=HASH_SHA256):
Expand Down Expand Up @@ -103,7 +103,9 @@ def test_authentication_manual_bytes(demo_mid_api, hash_type, MID_DEMO_PIN_EE_OK
with patch.object(demo_mid_api, "invoke", return_value=response_data):
expected_hash = generate_hash(hash_type, custom_random_data)

res = demo_mid_api.authenticate(MID_DEMO_PIN_EE_OK, MID_DEMO_PHONE_EE_OK, hash_type=hash_type, random_bytes=custom_random_data)
res = demo_mid_api.authenticate(
MID_DEMO_PIN_EE_OK, MID_DEMO_PHONE_EE_OK, hash_type=hash_type, random_bytes=custom_random_data
)

assert isinstance(res, AuthenticateResult)
assert res.session_id == "FAKE"
Expand Down
6 changes: 4 additions & 2 deletions esteid/smartid/tests/test_auth_and_sign_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from pyasice.tsa import TSA

from esteid.constants import HASH_ALGORITHMS, HASH_SHA256, HASH_SHA384, HASH_SHA512, OCSP_DEMO_URL, TSA_DEMO_URL
from ..utils import get_verification_code

from ...exceptions import (
ActionInProgress,
Expand All @@ -25,6 +24,7 @@
from ..base import SmartIDService
from ..constants import CERTIFICATE_LEVEL_QUALIFIED, Countries
from ..types import AuthenticateResult, AuthenticateStatusResult, SignResult, SignStatusResult
from ..utils import get_verification_code


@pytest.mark.parametrize("hash_type", HASH_ALGORITHMS)
Expand Down Expand Up @@ -68,7 +68,9 @@ def test_authentication_manual_bytes(demo_api, hash_type, SMARTID_DEMO_ID_CODE_E
with patch.object(demo_api, "invoke", return_value=response_data):
expected_hash = generate_hash(hash_type, custom_random_data)

res = demo_api.authenticate(SMARTID_DEMO_ID_CODE_EE, Countries.ESTONIA, hash_type=hash_type, random_bytes=custom_random_data)
res = demo_api.authenticate(
SMARTID_DEMO_ID_CODE_EE, Countries.ESTONIA, hash_type=hash_type, random_bytes=custom_random_data
)

assert isinstance(res, AuthenticateResult)
assert res.session_id == "FAKE"
Expand Down

0 comments on commit b6e1cc8

Please # to comment.