TestMockSpaceService
Mock implementation of SpaceService for testing. All methods return mock data instead of making actual API calls.
AUTH_API_KEY_HEADER_PREFIX: strAUTH_HEADER_KEY: strUSER_ID_HEADER_KEY: strConstructor of the SpaceService
Mock add_or_replace_tags_on_object - returns the same tags
strlistlistMock add_tags_to_object - returns the same tags
strlistlistMock check_2_fa - returns mock UserSpace
UserCredentials2FaUserSpaceMock check_api_key - always returns True
strboolMock check_credentials - returns mock response
UserCredentialsDTObool - TrueMock create_child_folder
strExternalSpaceCreateFolderExternalSpaceFolderCreate a Constellab document in a folder in space
strstrSpaceHierarchyObjectDTOMock create_root_folder that returns a fake folder
ExternalSpaceCreateFolderExternalSpaceFolderDelete a document by moving it to trash
strSpaceHierarchyObjectDTOMock delete_folder
strMock delete_note
strstrMock delete_scenario
strstrMock delete_tags_on_object
strlistDownload a document from space and return the bytes directly
strstr | NonebytesMock get_all_current_user_root_folders - returns empty list
listMock get_all_lab_root_folders - returns empty folders
ExternalSpaceFoldersMock get_all_lab_users - returns empty list
listGet all groups for the current lab
listMock get_folder_users - returns empty list
strlistMock get_lab_root_folder
strExternalSpaceFolderMock get_reflex_access_token - returns a fake token
strMock get_modifications
RichTextDTORichTextDTOgws_core.impl.rich_text.rich_text_modification.RichTextModificationsDTO | NoneRichTextModificationsDTOMock get_undo_content
RichTextDTORichTextModificationsDTOstrRichTextDTOMock get_synced_notes - returns empty list
listMock get_synced_scenarios - returns empty list
listMock get_user_info
strUserFullDTOCentralized error handler for all space service operations. Converts connection errors to user-friendly messages.
ExceptionstrNoReturnMock register_lab_start - always returns True
LabConfigModelDTOboolRename a document in space
strstrMock save_note
strSaveNoteToSpaceDTOFormDataSpaceHierarchyObjectDTOMock save_scenario
strSaveScenarioToSpaceDTOSpaceHierarchyObjectDTOGet paginated children of a folder with search capabilities
strSpaceHierarchyObjectSearchParamsintintPageDTO[SpaceHierarchyObjectDTO]Mock send_mail
SpaceSendMailToUsersDTOResponseMock send_mail_to_mails
SpaceSendMailToMailsDTOResponseSend a mail to support.
SpaceSendMailToSupportDTOResponseMock send_notification
SpaceSendNotificationDTOResponseSet mock space folder users
listMock update_folder that returns a fake updated folder
strExternalSpaceCreateFolderExternalSpaceFolderUpdate the role of a user for a folder. This is an alias for update_share_folder.
strstrSpaceRootFolderUserRoleMock update_note_folder
strstrstrMock update_scenario_folder
strstrstrUpload a document to a folder in space
strstrDocumentUploadOverrideModestr | NoneSpaceHierarchyObjectDTOReturn a new instance of the SpaceService that use the access token for authentication
SpaceServiceBaseTypeReturn a new instance of the SpaceService that use the current user for authentication
SpaceServiceBaseTypeGenerate URL for user profile picture with specified size.
strstrBuild a PageDTO from Space API JSON response format (ClPageI).
The Space API returns paginated data in the ClPageI format: { "objects": T[], "first": boolean, "last": boolean, "totalElements": number, "currentPage": number, "pageSize": number, "totalIsApproximate"?: boolean }
This method converts it to the internal PageDTO format.
dictCallablePageDTO[~T]