Factories
hypha.apply.stream_forms.testing.factories
¶
NON_FILE_BLOCK_FACTORY_DEFINITION
module-attribute
¶
NON_FILE_BLOCK_FACTORY_DEFINITION = {'text_markup': SubFactory(ParagraphBlockFactory), 'char': SubFactory(CharFieldBlockFactory), 'text': SubFactory(TextFieldBlockFactory), 'number': SubFactory(NumberFieldBlockFactory), 'checkbox': SubFactory(CheckboxFieldBlockFactory), 'radios': SubFactory(RadioFieldBlockFactory), 'dropdown': SubFactory(DropdownFieldBlockFactory), 'checkboxes': SubFactory(CheckboxesFieldBlockFactory), 'date': SubFactory(DateFieldBlockFactory), 'time': SubFactory(TimeFieldBlockFactory), 'datetime': SubFactory(DateTimeFieldBlockFactory)}
BLOCK_FACTORY_DEFINITION
module-attribute
¶
BLOCK_FACTORY_DEFINITION = {None: NON_FILE_BLOCK_FACTORY_DEFINITION, 'image': SubFactory(ImageFieldBlockFactory), 'file': SubFactory(FileFieldBlockFactory), 'multi_file': SubFactory(MultiFileFieldBlockFactory)}
NonFileFormFieldsBlockFactory
module-attribute
¶
NonFileFormFieldsBlockFactory = StreamFieldUUIDFactory(NON_FILE_BLOCK_FACTORY_DEFINITION)
FormFieldsBlockFactory
module-attribute
¶
FormFieldsBlockFactory = StreamFieldUUIDFactory(BLOCK_FACTORY_DEFINITION)
AnswerFactory
¶
Bases: Factory
AddFormFieldsMetaclass
¶
Bases: FactoryMetaClass
FormDataFactory
¶
Bases: Factory
ParagraphBlockFactory
¶
FormFieldBlockFactory
¶
CharFieldBlockFactory
¶
Bases: FormFieldBlockFactory
TextFieldBlockFactory
¶
Bases: FormFieldBlockFactory
DateFieldBlockFactory
¶
Bases: FormFieldBlockFactory
TimeFieldBlockFactory
¶
Bases: FormFieldBlockFactory
DateTimeFieldBlockFactory
¶
NumberFieldBlockFactory
¶
Bases: FormFieldBlockFactory
CheckboxFieldBlockFactory
¶
Bases: FormFieldBlockFactory
CheckboxesFieldBlockFactory
¶
Bases: FormFieldBlockFactory
RadioFieldBlockFactory
¶
Bases: FormFieldBlockFactory
DropdownFieldBlockFactory
¶
Bases: FormFieldBlockFactory
UploadableMediaFactory
¶
Bases: FormFieldBlockFactory
help_text
class-attribute
instance-attribute
¶
Meta
¶
make_form_answer
classmethod
¶
make_answer
classmethod
¶
Source code in hypha/apply/stream_forms/testing/factories.py
ImageFieldBlockFactory
¶
Bases: UploadableMediaFactory
help_text
class-attribute
instance-attribute
¶
Meta
¶
make_answer
classmethod
¶
Source code in hypha/apply/stream_forms/testing/factories.py
FileFieldBlockFactory
¶
Bases: UploadableMediaFactory
help_text
class-attribute
instance-attribute
¶
Meta
¶
make_answer
classmethod
¶
Source code in hypha/apply/stream_forms/testing/factories.py
MultiFileFieldBlockFactory
¶
Bases: UploadableMediaFactory
StreamFieldUUIDFactory
¶
Bases: StreamFieldFactory