"""This module contains the factories for the ``django_discover`` app"""

import factory
from django.conf import settings

from .models import DiscoverItem


class DiscoverItemFactory(factory.django.DjangoModelFactory):
    """Factory for the ``DiscoverItem`` model"""

    language = settings.LANGUAGES[0][0]
    title = factory.Sequence(lambda n: 'discover item %d' % n)
    slug = factory.Sequence(lambda n: 'discover-item-%d' % n)
    image = factory.django.ImageField()
    short_description = factory.Sequence(lambda n: 'short description discover item %d' % n)
    long_description = factory.Sequence(lambda n: 'long description discover item %d' % n)

    class Meta:
        model = DiscoverItem
