Files
edx-platform/lms/djangoapps/verify_student/tests/factories.py
Feanil Patel 9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00

25 lines
644 B
Python

"""
Factories related to student verification.
"""
from datetime import timedelta
from django.conf import settings
from django.utils.timezone import now
from factory.django import DjangoModelFactory
from lms.djangoapps.verify_student.models import SoftwareSecurePhotoVerification
class SoftwareSecurePhotoVerificationFactory(DjangoModelFactory):
"""
Factory for SoftwareSecurePhotoVerification
"""
class Meta(object):
model = SoftwareSecurePhotoVerification
status = 'approved'
if hasattr(settings, 'VERIFY_STUDENT'):
expiry_date = now() + timedelta(days=settings.VERIFY_STUDENT["DAYS_GOOD_FOR"])