19 lines
433 B
Python
19 lines
433 B
Python
from datetime import datetime
|
|
|
|
from django.utils import timezone
|
|
from factory.django import DjangoModelFactory
|
|
|
|
from .models import Event
|
|
|
|
|
|
def get_date(date_string):
|
|
return datetime.strptime(date_string, '%b %d %Y', ).astimezone(timezone.get_current_timezone())
|
|
|
|
|
|
class EventFactory(DjangoModelFactory):
|
|
class Meta:
|
|
model = Event
|
|
|
|
title = "Prüfung Versicherungsvermittler/-in"
|
|
end = get_date("Jan 01 2021")
|