Source: factory.core/ObjTest.py
Provides methods for generating and validating South African ID numbers.
| Method | Signature | Description |
|---|---|---|
| calculate_checksum | calculate_checksum(id_number_base: str) -> int |
Calculates the checksum digit for a 12-digit base number using Luhn. |
| generate_sa_id | generate_sa_id(dob: str = None, gender: str = None, citizen: bool = True) -> str |
Generates a valid South African ID number. |
| validate_sa_id | validate_sa_id(id_number: str) -> bool |
Validates an existing South African ID number. |
| generate_test_ids_csv | generate_test_ids_csv(count: int, output_file: str) |
Generates a set of test ID numbers and outputs them to a CSV file. |
| is_valid_test_id | is_valid_test_id(id_number: str) -> bool |
Checks if an ID number is a valid test ID. |