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
call_endpoint(*, cmd, url, operation[, ...])DISABLED Call a REST API endpoint of SciCat.
create_attachment(attachment)Create a new attachment for a dataset in SciCat.
create_dataset_model(dset)Create a new dataset in SciCat.
create_orig_datablock(dblock)Create a new orig datablock in SciCat.
create_proposal_model(proposal)Create a new proposal 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_all_instrument_models([strict_validation])Fetch all available instruments from SciCat.
get_dataset_model(pid[, strict_validation, ...])Fetch a dataset from SciCat.
get_instrument_model(instrument_id[, ...])Fetch an instrument from SciCat.
get_proposal_model(proposal_id[, ...])Fetch a proposal 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.
Attributes
is_authenticatedReturn True if this client is authenticated with SciCat.
- call_endpoint(*, cmd, url, operation, data=None, params=None, version='v3')[source]#
DISABLED Call a REST API endpoint of SciCat.
- Return type:
- create_attachment(attachment)[source]#
Create a new attachment for a dataset in SciCat.
- Return type:
- get_all_instrument_models(strict_validation=False)[source]#
Fetch all available instruments from SciCat.
- Return type:
- get_dataset_model(pid, strict_validation=False, *, attachments=False, datablocks=False)[source]#
Fetch a dataset from SciCat.
- Return type:
- get_instrument_model(instrument_id, strict_validation=False)[source]#
Fetch an instrument from SciCat.
- Return type:
- get_proposal_model(proposal_id, strict_validation=False)[source]#
Fetch a proposal from SciCat.
- Return type: