Description
Factory Boy requires a model to define a factory, however sometimes there's a need of taking advantage of the factory boy functionality without a model.
Requirements
Add an entry under Factory boy, where a solution such as the one below is presented.
fromtypingimportNamedTupleimportfactoryclassTestUser(NamedTuple):
id: intname: strclassTestUserFactory(factory.Factory):
classMeta:
model=TestUserid=factory.Sequence(lambdan: 1000+n)
name=factory.Faker('name')Acceptance Criteria
Provide a complete example
and
tuf=TestUserFactory(name="John O'Reilly")
Description
Factory Boy requires a model to define a factory, however sometimes there's a need of taking advantage of the factory boy functionality without a model.
Requirements
Add an entry under Factory boy, where a solution such as the one below is presented.
Acceptance Criteria
Provide a complete example
and