* feat: add VerificationAttempt model to verify_student application This commits adds a VerificationAttempt model to store implementation and provider agnostic information about identity verification attempts in the platform. * feat: add api for VerificationAttempt model * fix: error handling for update - added tests accordingly - also took care of some nits * chore: lint * chore: lint for equals spaces * feat: using generic update function instead - can now update name, status, and exp. date on generic attempts - changed tests accordingly - a few nits * chore: fix docstring args * fix: corrected status validation - reverted to old status validation method - fixed tests accordingly * fix: datetime, status, and annotation fixes - expiration_datetime can be updated to None - VerificationAttemptStatus is now StrEnum - Added type annotations for api functions --------- Co-authored-by: michaelroytman <mroytman@edx.org>
23 lines
745 B
Python
23 lines
745 B
Python
"""
|
|
Status enums for verify_student.
|
|
"""
|
|
from enum import StrEnum, auto
|
|
|
|
|
|
class VerificationAttemptStatus(StrEnum):
|
|
"""This class describes valid statuses for a verification attempt to be in."""
|
|
|
|
# This is the initial state of a verification attempt, before a learner has started IDV.
|
|
CREATED = auto()
|
|
|
|
# A verification attempt is pending when it has been started but has not yet been completed.
|
|
PENDING = auto()
|
|
|
|
# A verification attempt is approved when it has been approved by some mechanism (e.g. automatic review, manual
|
|
# review, etc).
|
|
APPROVED = auto()
|
|
|
|
# A verification attempt is denied when it has been denied by some mechanism (e.g. automatic review, manual review,
|
|
# etc).
|
|
DENIED = auto()
|