More realistic seeds

This commit is contained in:
George Drummond
2019-06-12 10:28:11 -04:00
parent e554845407
commit 9edf816765
2 changed files with 10 additions and 5 deletions

View File

@@ -30,7 +30,7 @@ def random_phone_number():
def random_task_order_number():
return "-".join([str(random.randint(100, 999)) for _ in range(4)])
return "".join(random.choices(string.digits, k=10))
def random_past_date(year_min=1, year_max=5):
@@ -261,7 +261,7 @@ class AttachmentFactory(Base):
class Meta:
model = Attachment
filename = factory.Faker("domain_word")
filename = factory.Faker("file_name", extension="pdf")
object_name = factory.LazyFunction(lambda *args: uuid4().hex)