Fakultas Ilmu Komputer UI

Commit 76a8ad0a authored by Muhammad Fairuzi Teguh's avatar Muhammad Fairuzi Teguh
Browse files

[REFACTOR] limit title length from faker

parent 728d5227
Pipeline #48932 failed with stages
in 3 minutes and 32 seconds
......@@ -12,6 +12,6 @@ class ArtikelFactory(factory.DjangoModelFactory):
class Meta:
model = Artikel
title = fake.sentence()[:-1]
title = fake.sentence()[:-1][:30]
featured_image = os.path.join("edukasi", "placeholder.jpg")
content = "\n".join(fake.paragraphs())
......@@ -19,7 +19,7 @@ class Command(BaseCommand):
for i in range(5):
content.append(" ".join(fake.paragraphs()))
Artikel.objects.create(
title=fake.sentence()[:-1],
title=fake.sentence()[:-1][:30],
featured_image=os.path.join("edukasi", random.choice([ # NOSONAR
"placeholder1.jpg", "placeholder2.jpg", "placeholder3.jpg"])),
content="\n".join(content)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment