factories.py 277 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
import factory

from .models import Article


class ArticleFactory(factory.django.DjangoModelFactory):
    class Meta:
        model = Article
    url = factory.Faker("url")
    lang = "en"
    title = factory.Faker("sentence", nb_words=4)
    extracts = factory.Faker("text")