Bases: FormFieldBlockFactory
default_value
class-attribute
instance-attribute
default_value = Faker('sentence')
field_label
class-attribute
instance-attribute
field_label = Faker('sentence')
help_text
class-attribute
instance-attribute
help_text = LazyAttribute(lambda o: f'Help text for {__name__}')
Meta
model
class-attribute
instance-attribute
make_answer
classmethod
Source code in hypha/apply/stream_forms/testing/factories.py
| @classmethod
def make_answer(cls, params=None):
params = params or {}
return cls.default_value.evaluate(None, None, dict(params, locale=None))
|
make_form_answer
classmethod
make_form_answer(params=None)
Source code in hypha/apply/stream_forms/testing/factories.py
| @classmethod
def make_form_answer(cls, params=None):
if params:
return params
return cls.make_answer(params or {})
|