Skip to content

Commit

Permalink
fix: use faker directly for non-factory managed faked things (#5041)
Browse files Browse the repository at this point in the history
  • Loading branch information
rjsparks authored Jan 27, 2023
1 parent 185c4d5 commit 0ea04b2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ietf/ipr/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import datetime
import factory
from faker import Faker

from django.utils import timezone

Expand All @@ -13,12 +14,13 @@
)

def _fake_patent_info():
fake = Faker()
return "Date: %s\nNotes: %s\nTitle: %s\nNumber: %s\nInventor: %s\n" % (
(timezone.now()-datetime.timedelta(days=365)).strftime("%Y-%m-%d"),
factory.Faker('paragraph'),
factory.Faker('sentence', nb_words=8),
fake.paragraph(),
fake.sentence(nb_words=8),
'US9999999',
factory.Faker('name'),
fake.name(),
)

class IprDisclosureBaseFactory(factory.django.DjangoModelFactory):
Expand Down

0 comments on commit 0ea04b2

Please sign in to comment.