Пример #1
0
 def launch(self, view_model):
     result = DummyDataType()
     if view_model.param_5 is not None:
         result.row1 = str(view_model.param_5)
     if view_model.param_6 is not None:
         result.row2 = str(view_model.param_6)
     return h5.store_complete(result, self.storage_path)
Пример #2
0
    def build(row1=None, row2=None, project=None, operation=None, subject=None, state=None):
        data_type = DummyDataType()
        data_type.row1 = row1
        data_type.row2 = row2

        if operation is None:
            operation = operation_factory(test_project=project)

        data_type_index = DummyDataTypeIndex(subject=subject, state=state)
        data_type_index.fk_from_operation = operation.id
        data_type_index.fill_from_has_traits(data_type)

        data_type_h5_path = h5.path_for_stored_index(data_type_index)
        with DummyDataTypeH5(data_type_h5_path) as f:
            f.store(data_type)

        data_type_index = dao.store_entity(data_type_index)
        return data_type_index
Пример #3
0
 def build():
     return DummyDataType()