generate random name
This commit is contained in:
parent
c62facdb60
commit
fa64c9aed1
2 changed files with 27 additions and 25 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue