| 1 | from .conftest import get_client, verify_request_count |
| 2 | |
| 3 | from auth0.management import PostConnectionKeysRequestContent, RotateConnectionKeysRequestContent |
| 4 | |
| 5 | |
| 6 | def test_connections_keys_get() -> None: |
| 7 | """Test get endpoint with WireMock""" |
| 8 | test_id = "connections.keys.get.0" |
| 9 | client = get_client(test_id) |
| 10 | client.connections.keys.get( |
| 11 | id="id", |
| 12 | ) |
| 13 | verify_request_count(test_id, "GET", "/connections/id/keys", None, 1) |
| 14 | |
| 15 | |
| 16 | def test_connections_keys_create() -> None: |
| 17 | """Test create endpoint with WireMock""" |
| 18 | test_id = "connections.keys.create.0" |
| 19 | client = get_client(test_id) |
| 20 | client.connections.keys.create( |
| 21 | id="id", |
| 22 | request=PostConnectionKeysRequestContent(), |
| 23 | ) |
| 24 | verify_request_count(test_id, "POST", "/connections/id/keys", None, 1) |
| 25 | |
| 26 | |
| 27 | def test_connections_keys_rotate() -> None: |
| 28 | """Test rotate endpoint with WireMock""" |
| 29 | test_id = "connections.keys.rotate.0" |
| 30 | client = get_client(test_id) |
| 31 | client.connections.keys.rotate( |
| 32 | id="id", |
| 33 | request=RotateConnectionKeysRequestContent(), |
| 34 | ) |
| 35 | verify_request_count(test_id, "POST", "/connections/id/keys/rotate", None, 1) |