scitacean.testing.client.FakeScicatClient#
- class scitacean.testing.client.FakeScicatClient(main_client)[source]#
Mimics a ScicatClient, to be used by FakeClient.
Constructors
__init__
(main_client)Methods
create_attachment_for_dataset
(attachment[, ...])Create a new attachment for a dataset in SciCat.
create_dataset_model
(dset)Create a new dataset in SciCat.
create_orig_datablock
(dblock, *, dataset_id)Create a new orig datablock in SciCat.
create_sample_model
(sample)Create a new sample in SciCat.
from_credentials
(url, username, password[, ...])Create a new low-level client and authenticate with username and password.
from_token
(url, token[, timeout])Create a new low-level client and authenticate with a token.
get_attachments_for_dataset
(pid[, ...])Fetch all attachments from SciCat for a given dataset.
get_dataset_model
(pid[, strict_validation])Fetch a dataset from SciCat.
get_orig_datablocks
(pid[, strict_validation])Fetch an orig datablock from SciCat.
get_sample_model
(sample_id[, strict_validation])Fetch a sample from SciCat.
query_datasets
(fields, *[, limit, order, ...])Query for datasets in SciCat.
validate_dataset_model
(dset)Validate model remotely in SciCat.
without_login
(url[, timeout])Create a new low-level client without authentication.
- create_attachment_for_dataset(attachment, dataset_id=None)[source]#
Create a new attachment for a dataset in SciCat.
- Return type:
- create_orig_datablock(dblock, *, dataset_id)[source]#
Create a new orig datablock in SciCat.
- Return type:
- get_attachments_for_dataset(pid, strict_validation=False)[source]#
Fetch all attachments from SciCat for a given dataset.
- Return type:
- get_orig_datablocks(pid, strict_validation=False)[source]#
Fetch an orig datablock from SciCat.
- Return type: