generate random name

This commit is contained in:
Waylon Walker 2023-06-14 08:11:37 -05:00
parent c62facdb60
commit fa64c9aed1
No known key found for this signature in database
GPG key ID: 66E2BF2B4190EFE4
2 changed files with 27 additions and 25 deletions

View file

@ -13,15 +13,21 @@ class HeroFactory(ModelFactory[Hero]):
id = None
pet_id = None
__random_seed__ = 10
@classmethod
def name(cls) -> str:
return cls.__faker__.first_name()
return (
cls.__faker__.word(part_of_speech="adjective")
+ "-"
+ cls.__faker__.word(part_of_speech="noun")
)
@classmethod
def secret_name(cls) -> str:
return cls.__faker__.name()
return (
cls.__faker__.word(part_of_speech="adjective")
+ "-"
+ cls.__faker__.word(part_of_speech="noun")
)
@classmethod
def age(cls) -> str: