mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 05:59:44 -04:00
DRY-up email revalidation check
Previously this was duplicated between the "two_factor" and the "webauthn" views, and required more test setup. This DRYs up the check and tests it once, using mocks to simplify the view tests. As part of DRYing up the check into a util module, I've also moved the "is_less_than_days_ago" function it uses.
This commit is contained in:
@@ -13,8 +13,9 @@ from app.models import JSONModel, ModelList, PaginatedModelList
|
||||
from app.notify_client.job_api_client import job_api_client
|
||||
from app.notify_client.notification_api_client import notification_api_client
|
||||
from app.notify_client.service_api_client import service_api_client
|
||||
from app.utils import is_less_than_days_ago, set_status_filters
|
||||
from app.utils import set_status_filters
|
||||
from app.utils.letters import get_letter_printing_statement
|
||||
from app.utils.time import is_less_than_days_ago
|
||||
|
||||
|
||||
class Job(JSONModel):
|
||||
|
||||
Reference in New Issue
Block a user