#! /usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Vera Mazhuga http://vero4ka.info
import datetime

from django.utils.timezone import now

from ..models import Event, Person

import factory
import factory.fuzzy


class EventFactory(factory.django.DjangoModelFactory):
    title = factory.fuzzy.FuzzyText(length=50)
    start_date = factory.fuzzy.FuzzyDateTime(now() - datetime.timedelta(days=2000 * 365))

    class Meta:
        model = Event


class PersonFactory(factory.django.DjangoModelFactory):
    name = factory.fuzzy.FuzzyText(length=50)

    class Meta:
        model = Person