Browse Source

test: verify signature

pull/566/head
Richard Nemeth 11 months ago
parent
commit
094efde27d
No known key found for this signature in database GPG Key ID: 21C39470DF3DEC39
  1. 5
      tests/test_connection.py
  2. 4
      tests/test_keycloak_admin.py
  3. 4
      tests/test_keycloak_openid.py
  4. 4
      tests/test_keycloak_uma.py

5
tests/test_connection.py

@ -1,5 +1,7 @@
"""Connection test module."""
from inspect import signature
import pytest
from keycloak.connection import ConnectionManager
@ -65,3 +67,6 @@ def test_counter_part():
for method in sync_methods:
async_method = method[2:]
assert (async_method in con_methods) is True
sync_sign = signature(getattr(ConnectionManager, method))
async_sign = signature(getattr(ConnectionManager, async_method))
assert sync_sign.parameters == async_sign.parameters

4
tests/test_keycloak_admin.py

@ -3,6 +3,7 @@
import copy
import os
import uuid
from inspect import signature
from typing import Tuple
import freezegun
@ -6160,3 +6161,6 @@ def test_counter_part():
for method in sync_methods:
async_method = f"a_{method}"
assert (async_method in admin_methods) is True
sync_sign = signature(getattr(KeycloakAdmin, method))
async_sign = signature(getattr(KeycloakAdmin, async_method))
assert sync_sign.parameters == async_sign.parameters

4
tests/test_keycloak_openid.py

@ -1,5 +1,6 @@
"""Test module for KeycloakOpenID."""
from inspect import signature
from typing import Tuple
from unittest import mock
@ -987,3 +988,6 @@ def test_counter_part():
for method in sync_methods:
async_method = f"a_{method}"
assert (async_method in openid_methods) is True
sync_sign = signature(getattr(KeycloakOpenID, method))
async_sign = signature(getattr(KeycloakOpenID, async_method))
assert sync_sign.parameters == async_sign.parameters

4
tests/test_keycloak_uma.py

@ -1,6 +1,7 @@
"""Test module for KeycloakUMA."""
import re
from inspect import signature
import pytest
@ -613,3 +614,6 @@ def test_counter_part():
for method in sync_methods:
async_method = f"a_{method}"
assert (async_method in uma_methods) is True
sync_sign = signature(getattr(KeycloakUMA, method))
async_sign = signature(getattr(KeycloakUMA, async_method))
assert sync_sign.parameters == async_sign.parameters
Loading…
Cancel
Save