| 1 | from .conftest import get_client, verify_request_count |
| 2 | |
| 3 | |
| 4 | def test_userBlocks_list_by_identifier() -> None: |
| 5 | """Test listByIdentifier endpoint with WireMock""" |
| 6 | test_id = "user_blocks.list_by_identifier.0" |
| 7 | client = get_client(test_id) |
| 8 | client.user_blocks.list_by_identifier( |
| 9 | identifier="identifier", |
| 10 | consider_brute_force_enablement=True, |
| 11 | ) |
| 12 | verify_request_count( |
| 13 | test_id, "GET", "/user-blocks", {"identifier": "identifier", "consider_brute_force_enablement": "true"}, 1 |
| 14 | ) |
| 15 | |
| 16 | |
| 17 | def test_userBlocks_delete_by_identifier() -> None: |
| 18 | """Test deleteByIdentifier endpoint with WireMock""" |
| 19 | test_id = "user_blocks.delete_by_identifier.0" |
| 20 | client = get_client(test_id) |
| 21 | client.user_blocks.delete_by_identifier( |
| 22 | identifier="identifier", |
| 23 | ) |
| 24 | verify_request_count(test_id, "DELETE", "/user-blocks", {"identifier": "identifier"}, 1) |
| 25 | |
| 26 | |
| 27 | def test_userBlocks_list_() -> None: |
| 28 | """Test list endpoint with WireMock""" |
| 29 | test_id = "user_blocks.list_.0" |
| 30 | client = get_client(test_id) |
| 31 | client.user_blocks.list( |
| 32 | id="id", |
| 33 | consider_brute_force_enablement=True, |
| 34 | ) |
| 35 | verify_request_count(test_id, "GET", "/user-blocks/id", {"consider_brute_force_enablement": "true"}, 1) |
| 36 | |
| 37 | |
| 38 | def test_userBlocks_delete() -> None: |
| 39 | """Test delete endpoint with WireMock""" |
| 40 | test_id = "user_blocks.delete.0" |
| 41 | client = get_client(test_id) |
| 42 | client.user_blocks.delete( |
| 43 | id="id", |
| 44 | ) |
| 45 | verify_request_count(test_id, "DELETE", "/user-blocks/id", None, 1) |