sgmock.shotgun¶
Mock replacement for shotgun_api3 module.
-
class
sgmock.shotgun.Shotgun(base_url=None, *args, **kwargs)¶ A mock Shotgun server, replicating the
shotgun_api3interface.The constructor is a dummy and eats all arguments.
-
batch(requests)¶ Perform a series of requests in one request.
This mock does not have transactions, so a failed request will leave the data store in a partially mutated state.
Parameters: requests (list) – A series of dictsrepresenting requests.Returns: listof results from calling methods individually.
-
create(entity_type, data, return_fields=None, _log=True, _generate_events=True)¶ Store an entity of the given type and data; return the new entity.
Parameters:
-
delete(entity_type, entity_id, _generate_events=True)¶ Delete a single entity.
This mock does not have retired entities, so once it is deleted an entity is gone.
Parameters: Return bool: Trueif the entity did exist.
-
-
exception
sgmock.shotgun.ShotgunError¶ Exception for all server logic.
-
exception
sgmock.shotgun.Fault¶ Exception for all remote API logic; unused in this mock.