factories.py
553 Bytes
from factory import faker, django
from datetime import date
from evento.models import Evento
class EventoFactory(django.DjangoModelFactory):
class Meta:
model = Evento
titulo = faker.Faker(provider='sentence', nb_words=50)
categoria = faker.Faker(provider='sentence', nb_words=30)
direccion = 'https://maps.app.goo.gl/CNwbHBx5zq1VDje57'
descripcion = faker.Faker(provider='sentence', nb_words=30)
fecha_inicio = date(2024, 1, 1)
hora_inicio = '10:00:00'
fecha_final = date(2024, 1, 2)
hora_fin = '11:20:47'